Merge pull request #3231 from nextcloud/enh/3225/hadolint

adjust docker-lint to use hadolint
This commit is contained in:
Simon L 2023-09-27 12:10:33 +02:00 committed by GitHub
commit 3e25acce24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 20 deletions

View file

@ -16,6 +16,7 @@ VOLUME /mnt/ncdata
VOLUME /var/www/html
# Custom: change id of www-data user as it needs to be the same like on old installations
# hadolint ignore=SC2086,DL3003
RUN set -ex; \
apk add --no-cache shadow; \
deluser www-data; \
@ -85,7 +86,7 @@ RUN set -ex; \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
apk add --no-cache --virtual .nextcloud-phpext-rundeps $runDeps; \
apk del .build-deps; \
\
# set recommended PHP.ini settings
@ -170,7 +171,7 @@ RUN set -ex; \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
apk add --no-cache --virtual .nextcloud-phpext-rundeps $runDeps; \
apk del .build-deps; \
\
mkdir -p \
@ -219,6 +220,7 @@ RUN set -ex; \
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd
# hadolint ignore=DL3002
USER root
ENTRYPOINT ["/start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]