Sign inSign up

ouyi/docker-centos-httpd

By ouyi

•Updated over 7 years ago

Dockerized httpd (Apache HTTP Server) on CentOS 7 using self-signed certs for TLS

Image
0

10K+

ouyi/docker-centos-httpd repository overview

⁠Dockerized httpd (Apache HTTP Server) on CentOS 7

⁠Development notes

⁠Use systemd in centos:7 containers

Based on this documentation (section Systemd integration)⁠ and this post⁠.

⁠Self-signed certificates for TLS

Based on this tutorial⁠.

⁠Usage

⁠Build the Docker image
docker build . -t docker-centos-httpd
⁠Start the Docker container
docker run -p 8080:80 -p 8443:443 -d --cap-add=SYS_ADMIN -v /sys/fs/cgroup:/sys/fs/cgroup:ro docker-centos-httpd
⁠Tests within the container
curl https://localhost/ # CA not trusted
curl --cacert /etc/ssl/certs/selfsigned.crt https://localhost/ # Shall work
curl localhost # Will be redirected
curl -L --cacert /etc/ssl/certs/selfsigned.crt http://localhost/ # Shall work

Tag summary

Content type

Image

Digest

Size

109.5 MB

Last updated

over 7 years ago

docker pull ouyi/docker-centos-httpd