From 449858fb7768f718853512b8b1a3219274e2508e Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Thu, 25 Jun 2020 21:13:22 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Glenn Toms --- Dockerfile | 2 +- Dockerfile.arm32v7 | 2 +- Dockerfile.arm64v8 | 2 +- entrypoint.sh | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c760fec..ef734bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} & COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh -RUN mv /www/assets /www/default-assets +COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets USER ${USER} EXPOSE ${PORT} diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 8dc3b1c..69230e8 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -33,7 +33,7 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} & COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh -RUN mv /www/assets /www/default-assets +COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets USER ${USER} EXPOSE ${PORT} diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 8a7e99f..91c2ba2 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 @@ -33,7 +33,7 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} & COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh -RUN mv /www/assets /www/default-assets +COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets USER ${USER} EXPOSE ${PORT} diff --git a/entrypoint.sh b/entrypoint.sh index 0b7cd24..6b96f94 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,8 @@ #!/bin/sh while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/ - +# This makes sure that at least the default config is available. +yes n | cp -i /www/assets/config.yml.dist /www/assets/config.yml # Ensure compatibility with previous version (config.yml was in the root directory) if [ -f "/www/config.yml" ]; then yes n | cp -i /www/config.yml /www/assets -- 2.41.0