No can't use 80
parent
5e0df1dc95
commit
75821e01fd
|
@ -1,4 +1,5 @@
|
||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
|
ARG PORT=4441
|
||||||
|
|
||||||
# Install deps
|
# Install deps
|
||||||
RUN apt-get update && apt-get install --yes \
|
RUN apt-get update && apt-get install --yes \
|
||||||
|
@ -12,7 +13,9 @@ RUN chown -R www-data:www-data /usr/lib/wgapi /var/log/wgapi /var/local/wgapi_to
|
||||||
|
|
||||||
# Configure apache
|
# Configure apache
|
||||||
RUN a2enmod cgi rewrite
|
RUN a2enmod cgi rewrite
|
||||||
RUN sed -i 's|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|' \
|
RUN sed -i "s/^Listen 80$/Listen ${PORT}/" /etc/apache2/ports.conf
|
||||||
|
RUN sed -i -e "s/^<VirtualHost \*:80>$/<VirtualHost *:${PORT}>/" \
|
||||||
|
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
|
||||||
/etc/apache2/sites-available/000-default.conf
|
/etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
# Allow http user to run these binaries as root with sudo
|
# Allow http user to run these binaries as root with sudo
|
||||||
|
@ -26,5 +29,5 @@ COPY admin_user.cgi /usr/lib/cgi-bin/user
|
||||||
COPY lib/ /usr/lib/wgapi/
|
COPY lib/ /usr/lib/wgapi/
|
||||||
|
|
||||||
# Run time!
|
# Run time!
|
||||||
EXPOSE 80
|
EXPOSE ${PORT}
|
||||||
CMD ["apachectl", "-D", "FOREGROUND"]
|
CMD ["apachectl", "-D", "FOREGROUND"]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
|
ARG PORT=4442
|
||||||
|
|
||||||
# Install deps
|
# Install deps
|
||||||
RUN apt-get update && apt-get install --yes \
|
RUN apt-get update && apt-get install --yes \
|
||||||
|
@ -12,8 +13,9 @@ RUN chown -R www-data:www-data /usr/lib/wgapi /var/log/wgapi /var/local/wgapi_to
|
||||||
|
|
||||||
# Configure apache
|
# Configure apache
|
||||||
RUN a2enmod cgi rewrite
|
RUN a2enmod cgi rewrite
|
||||||
RUN sed -i "s/^Listen 80$/Listen ${DASHBOARD_PORT}/" /etc/apache2/ports.conf
|
RUN sed -i "s/^Listen 80$/Listen ${PORT}/" /etc/apache2/ports.conf
|
||||||
RUN sed -i "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
|
RUN sed -i -e "s/^<VirtualHost \*:80>$/<VirtualHost *:${PORT}>/" \
|
||||||
|
-e "s|DocumentRoot .*$|DocumentRoot /usr/lib/cgi-bin\n\tSetHandler cgi-script\n\tOptions +ExecCGI|" \
|
||||||
/etc/apache2/sites-available/000-default.conf
|
/etc/apache2/sites-available/000-default.conf
|
||||||
|
|
||||||
# Allow http user to run these binaries as root with sudo
|
# Allow http user to run these binaries as root with sudo
|
||||||
|
@ -27,5 +29,5 @@ COPY dashboard_ssl.cgi /usr/lib/cgi-bin/ssl
|
||||||
COPY lib/ /usr/lib/wgapi/
|
COPY lib/ /usr/lib/wgapi/
|
||||||
|
|
||||||
# Run time!
|
# Run time!
|
||||||
EXPOSE 80
|
EXPOSE ${PORT}
|
||||||
CMD ["apachectl", "-D", "FOREGROUND"]
|
CMD ["apachectl", "-D", "FOREGROUND"]
|
||||||
|
|
Loading…
Reference in New Issue