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.arm32v7 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Dockerfile.arm32v7') diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 01a2196..7e1d92b 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -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-arm-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