Skip to content

🐍🐳 A simple repo to demonstrate how to dockerize a Flask application.

Notifications You must be signed in to change notification settings

jezeniel/flask-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Docker

🐍🐳 A simple repo to demonstrate how to dockerize a Flask application.

Requirements

Building the image

  1. Clone the repository.
$ git clone https://github.com/jezeniel/flask-docker
  1. Change the directory.
$ cd flask-docker
  1. 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.

Running the image

  1. 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 port 8000 to the host machine.
    • the format is <host-port>:<container-port>
  1. You can now visit in http://127.0.0.1:8000/ to see your app.

Contributing

If you see any issues/problems/bugs, kindly create an issue or pull request. Cheers! 🍻

About

🐍🐳 A simple repo to demonstrate how to dockerize a Flask application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published