Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simple flask docker example

super simple example of docker with a flask app

how to run

how to run this project

Cloning the repo

first to run this example we need to clone the project

git clone https://github.com/StickyCoolDev/docker-flask-example

and change the directory to the cloned repo

cd docker-flask-example

Building the Container

to build the container we need to use the docker build command

# by using the . (current) directory we are telling
# docker to look for a Dockerfile in the current directory
docker build -t cool-app . 

Running the Container

after building the container we need to run it with the docker run command

docker run -p 5000:5000 cool-app # running the container with port 5000 mapped to 5000

Some Docker commands

docker ps

the docker ps command shows all of the current running container's

docker ps

docker pull <name>

the docker pull command downloads a already made image from Docker Hub

docker pull hello-world