Apache web server Docker image deployment and usage


The automated build docker Apache web server image “linuxconfig/nginx” can be used as for an instant deployments of static HTML websites.


The image is build based on default Apache2 web server configuration running on Debian GNU/Linux. The deployed container runs apache2 web server in foreground exposes port 80.


create and put your static website into a eg. html directory:

$ mkdir html
$ echo "Apache web server docker container" > html/index.html

Next, deploy your docker container:

$ sudo docker run -d -p 80:80 -v $PWD/html:/var/www/html/ linuxconfig/apache

Use your browser or command line to access your HTML static website:

$ curl -i localhost
HTTP/1.1 200 OK
Date: Tue, 12 May 2015 05:41:34 GMT
Server: Apache/2.4.10 (Debian)
Last-Modified: Tue, 12 May 2015 05:37:49 GMT
ETag: "23-515dbe5227326"
Accept-Ranges: bytes
Content-Length: 35
Content-Type: text/html

Apache web server docker container