Build yur own web server image and copy the document root into the image

Go to Project 2 from the git repository root:

cd projects/p02

Building an image:

docker build -t localhost/p02_httpd .

The dot character at the and of the line is important and required.

Start container:

docker run -d --name p02_httpd -p "80:80" localhost/p02_httpd

You can open the website from a web browser on port 80. The output should be “Hello Docker (p02)”

Delete the container to make port 8080 free again.

docker rm -f p02_httpd