Cleanup
This commit is contained in:
parent
b650bd6f8f
commit
2a1bc88800
14
Dockerfile
14
Dockerfile
|
|
@ -91,6 +91,8 @@ RUN \
|
||||||
RUN chown -R apache:apache /var/www
|
RUN chown -R apache:apache /var/www
|
||||||
# Make sure apache can read&right to logs
|
# Make sure apache can read&right to logs
|
||||||
RUN chown -R apache:apache /var/log/apache2
|
RUN chown -R apache:apache /var/log/apache2
|
||||||
|
# Allow Apache to create pid
|
||||||
|
RUN chown -R apache:apache /run/apache2
|
||||||
|
|
||||||
### Continue execution as Apache user ###
|
### Continue execution as Apache user ###
|
||||||
USER apache
|
USER apache
|
||||||
|
|
@ -114,9 +116,6 @@ EXPOSE 80
|
||||||
### Return to root user ###
|
### Return to root user ###
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# vhost config
|
|
||||||
COPY vhost.conf /etc/apache2/conf.d/vhost.conf
|
|
||||||
|
|
||||||
# syslog option '-Z' was changed to '-t', change this in /etc/conf.d/syslog so that syslog (and then cron) actually starts
|
# syslog option '-Z' was changed to '-t', change this in /etc/conf.d/syslog so that syslog (and then cron) actually starts
|
||||||
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/9279
|
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/9279
|
||||||
RUN sed -i 's/SYSLOGD_OPTS="-Z"/SYSLOGD_OPTS="-t"/g' /etc/conf.d/syslog
|
RUN sed -i 's/SYSLOGD_OPTS="-Z"/SYSLOGD_OPTS="-t"/g' /etc/conf.d/syslog
|
||||||
|
|
@ -134,12 +133,9 @@ VOLUME ["/var/www"]
|
||||||
|
|
||||||
# Allow apache user login
|
# Allow apache user login
|
||||||
RUN sed -i "s/apache(.*)\/sbin\/nologin/apache\\1\/bin\/ash/g" /etc/passwd
|
RUN sed -i "s/apache(.*)\/sbin\/nologin/apache\\1\/bin\/ash/g" /etc/passwd
|
||||||
# Make sure apache can read&right to docroot
|
|
||||||
RUN chown -R apache:apache /var/www
|
# vhost config
|
||||||
# Make sure apache can read&right to logs
|
COPY vhost.conf /etc/apache2/conf.d/vhost.conf
|
||||||
RUN chown -R apache:apache /var/log/apache2
|
|
||||||
# Allow Apache to create pid
|
|
||||||
RUN chown -R apache:apache /run/apache2
|
|
||||||
|
|
||||||
# Start Apache
|
# Start Apache
|
||||||
CMD ["/usr/sbin/httpd -k start"]
|
CMD ["/usr/sbin/httpd -k start"]
|
||||||
Loading…
Reference in New Issue