A nice and simple Python Flask application, which serves a greeting over HTTP.
To build a Docker image:
docker build -t python-hello-world .
Then, to run:
docker run --network=host python-hello-world
The app will respond on http://localhost:8000 :
$ curl localhost:8000
Hello World!
If you want to deploy it to a registry (e.g. this is how I publish it to my quay.io account):
docker login quay.io
docker tag python-hello-world quay.io/tdonohue/python-hello-world:latest
docker push quay.io/tdonohue/python-hello-world:latest
This example uses the nice Python image from Bitnami.
The Dockerfile is based on this one from Bitnami.