🐍🐳 A simple repo to demonstrate how to dockerize a Flask application.
- Clone the repository.
$ git clone https://github.com/jezeniel/flask-docker
- Change the directory.
$ cd flask-docker
- Run the docker build command.
$ docker build -t flask-docker:latest .
-t
is the tag of the build, you can change this whatever you want.
- To run the image you built:
$ docker run --rm -p 8000:5000 flask-docker:latest
--rm
flag will delete the running container when the container is stopped.-p 8000:5000
param is used to publish the port8000
to the host machine.- the format is
<host-port>:<container-port>
- the format is
- You can now visit in http://127.0.0.1:8000/ to see your app.
If you see any issues/problems/bugs, kindly create an issue or pull request. Cheers! 🍻