aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-06-25 21:13:22 -0700
committerGitHub <noreply@github.com>2020-06-25 21:13:22 -0700
commit449858fb7768f718853512b8b1a3219274e2508e (patch)
treed059f9664b8e46208af3be11c716903afc479b7b
parenta7ba289efa228613b18abc853c22fb3b5d99b9a7 (diff)
downloadhomer-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--Dockerfile2
-rw-r--r--Dockerfile.arm32v72
-rw-r--r--Dockerfile.arm64v82
-rw-r--r--entrypoint.sh3
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} &
23 23
24COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ 24COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
25COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh 25COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
26RUN mv /www/assets /www/default-assets 26COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
27 27
28USER ${USER} 28USER ${USER}
29EXPOSE ${PORT} 29EXPOSE ${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
34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ 34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh 35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
36RUN mv /www/assets /www/default-assets 36COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
37 37
38USER ${USER} 38USER ${USER}
39EXPOSE ${PORT} 39EXPOSE ${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
34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ 34COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh 35COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
36RUN mv /www/assets /www/default-assets 36COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
37 37
38USER ${USER} 38USER ${USER}
39EXPOSE ${PORT} 39EXPOSE ${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
3while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/ 3while 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.
5yes 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)
6if [ -f "/www/config.yml" ]; then 7if [ -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