diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 66cc03ec..92efd9e6 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -25,5 +25,13 @@ while IFS= read -r -d '' file; do esac done +# This feature can set the internal port that apache uses to something else. +# If docker is run on network:service mode, no two containers can use port 80 +# To use this, start the container with the additional environment variable "HTTP_PORT" +if [ ! -z ${HTTP_PORT} ]; then + sed -i "s/80/$HTTP_PORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf +fi + + # Start apache apache2-foreground