From 125e461786e023e8ba40f52c430f09d4bcc45a14 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Tue, 14 Jan 2025 18:53:28 -0800 Subject: [PATCH] Fixed apache config --- Dockerfile | 16 ++++++++++------ README.md | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 48a9150..39c6434 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ -# Use the PHP base image +################################################################################################################################# +# Project: https://git.4lt.ca/4lt/phpcontainer/ +# v 5.0.1 +################################################################################################################################# + FROM php:8.4.2-apache # Set maintainer information -LABEL version="5.0.0" +LABEL version="5.0.1" LABEL maintainer="4 Lights Consulting " LABEL description="Production-ready PHP Apache container" LABEL org.label-schema.vcs-url="https://git.4lt.ca/4lt/phpcontainer" @@ -57,10 +61,10 @@ RUN set -eux; \ a2enconf remoteip; \ sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' /etc/apache2/*.conf -# Configure Apache document root -RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf; \ - echo "ServerName localhost" >> /etc/apache2/apache2.conf +# More Apache settings +RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf +RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf +RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf -# Expose port and set command EXPOSE 80 CMD ["apache2-foreground"] diff --git a/README.md b/README.md index e886125..d8dfa07 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ Dockerhub: https://hub.docker.com/r/4lights/phpcontainer ```bash sudo su -docker buildx build --no-cache -t 4lights/phpcontainer:5.0.0 -t 4lights/phpcontainer:latest --load . +docker buildx build --no-cache -t 4lights/phpcontainer:5.0.1 -t 4lights/phpcontainer:latest --load . docker login -docker push 4lights/phpcontainer:5.0.0 +docker push 4lights/phpcontainer:5.0.1 docker push 4lights/phpcontainer:latest ```