[Docker] Allow to define port via HTTP_PORT (#2285)

This commit is contained in:
Bockiii 2021-10-09 19:02:38 +02:00 committed by GitHub
parent 11be390e65
commit 793c55f43d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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