diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-07-12 21:09:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-12 21:09:42 -0700 |
commit | 6de53c49b357df0bb77f1ea5edef20dec6cf3133 (patch) | |
tree | 8be01b854e29226938e0d62fd85e72489898d5be | |
parent | ab40c4e007c40f3d059ede3a912b9e180e04c274 (diff) | |
parent | fd9237eb52affce2d202ff3f21ef47a8bb3cf542 (diff) | |
download | homer-6de53c49b357df0bb77f1ea5edef20dec6cf3133.tar.gz homer-6de53c49b357df0bb77f1ea5edef20dec6cf3133.tar.zst homer-6de53c49b357df0bb77f1ea5edef20dec6cf3133.zip |
Merge pull request #108 from GlennToms/masterv20.07.2
Added su-exec to ARM dockerfiles and removed USER line
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Dockerfile.arm32v7 | 5 | ||||
-rw-r--r-- | Dockerfile.arm64v8 | 5 | ||||
-rw-r--r-- | entrypoint.sh | 4 |
4 files changed, 7 insertions, 9 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 --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets | 25 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets |
26 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | 26 | COPY entrypoint.sh /entrypoint.sh |
27 | 27 | ||
28 | EXPOSE ${PORT} | 28 | EXPOSE ${PORT} |
29 | VOLUME /www/assets | 29 | VOLUME /www/assets |
diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index ba9c95d..4a22003 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 | |||
@@ -28,14 +28,13 @@ ENV UID 911 | |||
28 | ENV PORT 8080 | 28 | ENV PORT 8080 |
29 | 29 | ||
30 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 30 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
31 | apk add -U darkhttpd && \ | 31 | apk add -U darkhttpd su-exec && \ |
32 | rm /usr/bin/qemu-arm-static | 32 | rm /usr/bin/qemu-arm-static |
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 --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets | 35 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets |
36 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | 36 | COPY entrypoint.sh /entrypoint.sh |
37 | 37 | ||
38 | USER ${USER} | ||
39 | EXPOSE ${PORT} | 38 | EXPOSE ${PORT} |
40 | VOLUME /www/assets | 39 | VOLUME /www/assets |
41 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | 40 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] |
diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 4e307d8..479f8a1 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 | |||
@@ -28,14 +28,13 @@ ENV UID 911 | |||
28 | ENV PORT 8080 | 28 | ENV PORT 8080 |
29 | 29 | ||
30 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 30 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
31 | apk add -U darkhttpd && \ | 31 | apk add -U darkhttpd su-exec && \ |
32 | rm /usr/bin/qemu-aarch64-static | 32 | rm /usr/bin/qemu-aarch64-static |
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 --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets | 35 | COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets |
36 | COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh | 36 | COPY entrypoint.sh /entrypoint.sh |
37 | 37 | ||
38 | USER ${USER} | ||
39 | EXPOSE ${PORT} | 38 | EXPOSE ${PORT} |
40 | VOLUME /www/assets | 39 | VOLUME /www/assets |
41 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | 40 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] |
diff --git a/entrypoint.sh b/entrypoint.sh index dd55cdb..f1a8c22 100644 --- a/entrypoint.sh +++ b/entrypoint.sh | |||
@@ -11,5 +11,5 @@ fi | |||
11 | # Install default config if no one is available. | 11 | # Install default config if no one is available. |
12 | yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null | 12 | yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null |
13 | 13 | ||
14 | chown -R $UID:$GID /www/assets/* | 14 | chown -R $UID:$GID /www/assets |
15 | exec su-exec $USER:$GROUP darkhttpd /www/ --no-listing --port "$PORT" | 15 | exec su-exec $UID:$GID darkhttpd /www/ --no-listing --port "$PORT" |