Hello Docker 3: long running container

Ocean Blue
Dec 6, 2020

After Hello Docker 2, we have a simplest self made Docker image with hi.py.

The container of the image simply prints a hi message and then terminate.

A typical Docker container is a long running process, however. We will see how it works in this piece.

Make an image that can be used as a web server

Create a new web serving program

Test the web serving program locally

Update the Dockerfile

Build a new Docker image

Check the docker images again, and you will find the image web has just been created.

Bring up a long running web server container

Check that the container doesn’t quit

Congratulations! We have just created a long running Docker container as a web server.

--

--