| COPY / / # buildkit |
| ENV LANG=C.utf8 |
| CMD ["/bin/bash"] |
| RUN /bin/sh -c dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm && dnf update -y && dnf install -y httpd mod_ssl openssl iproute cronie procps curl && dnf clean all && rm -rf /var/cache/dnf /usr/share/doc /usr/share/man /usr/share/locale/* # buildkit |
| COPY ./scripts/detect-memory.sh /scripts/detect-memory.sh # buildkit |
| COPY ./scripts/create-apache-mpm-config.sh /scripts/create-apache-mpm-config.sh # buildkit |
| COPY ./scripts/log-rotate.sh /scripts/log-rotate.sh # buildkit |
| COPY ./scripts/entrypoint-shared-httpd.sh /scripts/entrypoint-shared-httpd.sh # buildkit |
| COPY ./scripts/tune-mpm.sh /scripts/tune-mpm.sh # buildkit |
| RUN /bin/sh -c chmod +x /scripts/* # buildkit |
| RUN /bin/sh -c openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/localhost.key -x509 -days 3650 -subj "/CN=localhost" -out /etc/pki/tls/certs/localhost.crt # buildkit |
| COPY ./configs/remote_ip.conf /etc/httpd/conf.d/ # buildkit |
| COPY ./configs/default-index.conf /etc/httpd/conf.d/ # buildkit |
| RUN /bin/sh -c mkdir -p /etc/httpd/conf.d/vhosts # buildkit |
| RUN /bin/sh -c echo "15 */12 * * * root /scripts/log-rotate.sh" >> /etc/crontab # buildkit |
| EXPOSE [443/tcp 80/tcp] |
| HEALTHCHECK &{["CMD-SHELL" "curl -sfk https://localhost/ping || exit 1"] "30s" "5s" "1m0s" "0s" '\x03'} |
| ENTRYPOINT ["/scripts/entrypoint-shared-httpd.sh"] |