Skip to content
/ docker-httpd Public template

A Dockerfile installing Apache HTTPD 2.4 from source. Built on Alpine Linux.

License

Notifications You must be signed in to change notification settings

alfg/docker-httpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Apache HTTPD

A Dockerfile installing Apache 2.4 from source. Built on Alpine Linux.

Docker Stars Docker Pulls Docker Automated build Build Status

Usage

  • Pull docker image and run:
docker pull alfg/httpd
docker run -d -p 8080:80 --rm alfg/httpd
  • or build and run container from source:
docker build -t httpd 
docker run -d -p 8080:80 --rm httpd
  • or build using docker-compose:
docker-compose build
docker-compose up
  • cURL the server to verify:
$ curl -I localhost:8080/index.html

HTTP/1.1 200 OK
Date: Fri, 26 Jul 2019 23:56:07 GMT
Server: Apache/2.4.39 (Unix)
Last-Modified: Fri, 26 Jul 2019 23:55:34 GMT
ETag: "86-58e9e47322980"
Accept-Ranges: bytes
Content-Length: 134
Content-Type: text/html

Please note the container must be run in daemon mode, and not interactive due to Apache HTTPD shutting down on SIGWINCH signal. This is by design.

Configure

Apache HTTPD default configurations are included in the etc directory. You can override the configurations and these will be copied over into the container.

Also see etc/httpd/sites/ for adding or editing virtual hosts.

Resources

About

A Dockerfile installing Apache HTTPD 2.4 from source. Built on Alpine Linux.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published