Docker Assignment – Execution of Flask Application
In this assignment, I worked with Docker to run a simple web application using Flask. The
main aim of this assignment was to understand how Docker containers work and how a
web application can be accessed through a browser using localhost.
Steps
1. First, I installed and opened Docker Desktop on my Windows system and ensured that
the Docker engine was running properly.
2. I created a project folder and opened it in Visual Studio Code to manage my files easily.
3. I wrote a simple Flask application in Python that displays a message when accessed
through a browser.
4. I created a Dockerfile to define the instructions required to build a Docker image for my
application.
5. I created a [Link] file to install Flask inside the Docker container.
6. Using the Docker build command, I built the Docker image successfully.
7. After building the image, I ran the Docker container using port mapping so that the
application could be accessed from the browser.
8. Finally, I opened the browser and verified the output using [Link]