diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-06-25 21:13:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 21:13:22 -0700 |
commit | 449858fb7768f718853512b8b1a3219274e2508e (patch) | |
tree | d059f9664b8e46208af3be11c716903afc479b7b | |
parent | a7ba289efa228613b18abc853c22fb3b5d99b9a7 (diff) | |
download | homer-avoid-file-volume.tar.gz homer-avoid-file-volume.tar.zst homer-avoid-file-volume.zip |
Apply suggestions from code reviewavoid-file-volume
Co-authored-by: Glenn Toms <Glenn@Glenntoms.gg>
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Dockerfile.arm32v7 | 2 | ||||
-rw-r--r-- | Dockerfile.arm64v8 | 2 | ||||
-rw-r--r-- | entrypoint.sh | 3 |
4 files changed, 5 insertions, 4 deletions
@@ -23,7 +23,7 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} & | |||
23 | 23 | ||
24 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ | 24 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ |
25 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | 25 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh |
26 | RUN mv /www/assets /www/default-assets | 26 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets |
27 | 27 | ||
28 | USER ${USER} | 28 | USER ${USER} |
29 | EXPOSE ${PORT} | 29 | 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} & | |||
33 | 33 | ||
34 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ | 34 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ |
35 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | 35 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh |
36 | RUN mv /www/assets /www/default-assets | 36 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets |
37 | 37 | ||
38 | USER ${USER} | 38 | USER ${USER} |
39 | EXPOSE ${PORT} | 39 | 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} & | |||
33 | 33 | ||
34 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ | 34 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ |
35 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | 35 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh |
36 | RUN mv /www/assets /www/default-assets | 36 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets |
37 | 37 | ||
38 | USER ${USER} | 38 | USER ${USER} |
39 | EXPOSE ${PORT} | 39 | EXPOSE ${PORT} |
diff --git a/entrypoint.sh b/entrypoint.sh index 0b7cd24..6b96f94 100644 --- a/entrypoint.sh +++ b/entrypoint.sh | |||
@@ -1,7 +1,8 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/ | 3 | while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/ |
4 | 4 | # This makes sure that at least the default config is available. | |
5 | yes n | cp -i /www/assets/config.yml.dist /www/assets/config.yml | ||
5 | # Ensure compatibility with previous version (config.yml was in the root directory) | 6 | # Ensure compatibility with previous version (config.yml was in the root directory) |
6 | if [ -f "/www/config.yml" ]; then | 7 | if [ -f "/www/config.yml" ]; then |
7 | yes n | cp -i /www/config.yml /www/assets | 8 | yes n | cp -i /www/config.yml /www/assets |