This is a starter repo for building Flask app using Docker.
- Install
docker
CLI from here - Pull the pre-built image from hub
docker pull pavanpkulkarni/pythondocker-my-flask-app:1.1
- Run the app from docker
docker run --publish 5001:5001 pavanpkulkarni/pythondocker-my-flask-app:1.1
- Open browser http://127.0.0.1:5001/ to view the Flask App
- app.py :
- Source code for simple Flask app that will print
Hello, World!
on browser - This is exposed on port
5001
- Source code for simple Flask app that will print
- docker-compose.yml :
- contains the yaml configs to build a docker image
- map ports between local and container
- Dockerfile :
- Dockerfile to build a python image
- all the files from repo are copied to image
- expose port 5001 on image
- run cmd specified in the file.
- list_of_commands.txt
- cheat sheet for docker commands
- contains commands to create and push image to hub
- RemoveContainersAndImages.sh
- Generic script to delete all containers and images.
- requirements.txt
- List of packages to be installed on image