Based on this documentation (section Systemd integration
) and this post.
Based on this tutorial.
docker build . -t docker-centos-httpd
docker run -p 8080:80 -p 8443:443 -d --cap-add=SYS_ADMIN -v /sys/fs/cgroup:/sys/fs/cgroup:ro docker-centos-httpd
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