From 049f85221e945b90bf87d21afe4d306839d65740 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Sun, 10 Apr 2022 11:55:11 +0200 Subject: Simplify the container starting process to allow it to run with a unprivileged user --- Dockerfile.arm64v8 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Dockerfile.arm64v8') diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index f9e6675..573a2e4 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -32,14 +32,16 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} & apk add -U --no-cache lighttpd && \ rm /usr/bin/qemu-aarch64-static -COPY entrypoint.sh /entrypoint.sh -COPY lighttpd.conf /lighttpd.conf +WORKDIR /www +COPY lighttpd.conf /lighttpd.conf COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ -COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets + +USER ${USER} HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1 EXPOSE ${PORT} VOLUME /www/assets -ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] + +CMD ["lighttpd", "-D", "-f", "/lighttpd.conf"] -- cgit v1.2.3