optimze domaincheck Dockerfile

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2023-05-03 16:29:25 +02:00 committed by GitHub
parent 844382d220
commit ca9b0cccf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,18 +1,15 @@
FROM alpine:3.17.3
RUN apk add --no-cache lighttpd bash netcat-openbsd
RUN adduser -S www-data -G www-data
RUN rm -rf /etc/lighttpd/lighttpd.conf
COPY lighttpd.conf /etc/lighttpd/lighttpd.conf
RUN chmod +r -R /etc/lighttpd && \
RUN apk add --no-cache bash lighttpd netcat-openbsd; \
adduser -S www-data -G www-data; \
rm -rf /etc/lighttpd/lighttpd.conf; \
chmod +r -R /etc/lighttpd && \
chown www-data:www-data -R /var/www && \
chown www-data:www-data /etc/lighttpd/lighttpd.conf
mkdir -p /var/www/domaincheck
COPY --chown=www-data:www-data lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY start.sh /
RUN chmod +x /start.sh
COPY --chmod=775 start.sh /start.sh
USER www-data
RUN mkdir -p /var/www/domaincheck/
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD nc -z localhost $APACHE_PORT || exit 1