Sign inSign up

look4regev/python-flask-docker

By look4regev

•Updated about 7 years ago

Basic but efficient Flask python web service container

Image
0

198

look4regev/python-flask-docker repository overview

See github⁠

⁠python-flask-docker

Basic Python Flask app in Docker (slim and best practices standards) which prints the hostname and IP of the container

⁠Build application
docker-compose build
⁠Download precreated image

You can also just download the existing image from DockerHub⁠.

docker pull look4regev/python-flask-docker
⁠Run the container

Create a container from the image.

docker-compose up

Now visit http://localhost:8080⁠

 The hostname of the container is 6095273a4e9b and its IP is 172.17.0.2. 
⁠Verify the running container

Verify by checking the container ip and hostname (ID):

$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-container
172.17.0.2
$ docker inspect -f '{{ .Config.Hostname }}' my-container
6095273a4e9b

Tag summary

Content type

Image

Digest

Size

84.1 MB

Last updated

about 7 years ago

docker pull look4regev/python-flask-docker