Start a simple web server with mounted document root

Go to Project 1 from the git repository root:

cd projects/p01

Start the container:

docker run -d -v $(pwd)/www:/usr/local/apache2/htdocs:ro --name p01_httpd -p "8080:80" httpd:2.4
# or
docker run -d --mount type=bind,source=$(pwd)/www,target=/usr/local/apache2/htdocs,readonly --name p01_httpd -p "8080:80" httpd:2.4

Generate a domain name:

# example output:

Test the web page:
# output:
# Hello Docker (p01)

Delete the container to make port 8080 free again.

docker rm -f p01_httpd