Merge pull request #2494 from nextcloud/domaincheck-dockerfile

optimze domaincheck Dockerfile
This commit is contained in:
Simon L 2023-05-03 17:29:47 +02:00 committed by GitHub
commit 9b8a547f71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,18 +1,16 @@
FROM alpine:3.17.3
RUN apk add --no-cache lighttpd bash netcat-openbsd
RUN set -ex; \
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; \
mkdir -p /var/www/domaincheck; \
chown www-data:www-data -R /var/www
COPY --chown=www-data:www-data lighttpd.conf /etc/lighttpd/lighttpd.conf
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 && \
chown www-data:www-data -R /var/www && \
chown www-data:www-data /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