2. For a complete, step-by-step visual installation guide on setting up flask and docker with WSL Ubuntu, please click here
# . will look for a docker file in the current directory, we can also tag the image as: image_name:tag
docker build -t image_name .
# rm is important, it removes intermediate containers created, and it will give us an interactive terminal used as entrypoint, e.g. bash. This will provide us with a # bash terminal in case we pulled a python image instead of a python terminal
docker run -it --rm --entrypoint=bash --name=container_name image_name -p docker_port:external_port
For more details, see:
- Notes by Ayoub BERDEDDOUCH
- Notes by Hareesh Tummala