diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2020-06-19 08:01:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 08:01:44 -0700 |
commit | 638dee77047993a56953285a5a85685a0e101c79 (patch) | |
tree | 908edca2f073eb3f486d02272c90176a6d41cd07 | |
parent | aac817970ce37f5991ae94c5c58ea2e1695420e2 (diff) | |
parent | 29d6b359abd243e9b4c026020bfc5d82bee88b12 (diff) | |
download | homer-638dee77047993a56953285a5a85685a0e101c79.tar.gz homer-638dee77047993a56953285a5a85685a0e101c79.tar.zst homer-638dee77047993a56953285a5a85685a0e101c79.zip |
Merge pull request #87 from GlennToms/master140991098
Added ENV PORT options and EXPORT PORT
-rw-r--r-- | Dockerfile | 9 | ||||
-rw-r--r-- | Dockerfile.arm32v7 | 9 | ||||
-rw-r--r-- | Dockerfile.arm64v8 | 9 | ||||
-rw-r--r-- | entrypoint.sh | 6 |
4 files changed, 24 insertions, 9 deletions
@@ -16,12 +16,15 @@ ENV USER darkhttpd | |||
16 | ENV GROUP darkhttpd | 16 | ENV GROUP darkhttpd |
17 | ENV GID 911 | 17 | ENV GID 911 |
18 | ENV UID 911 | 18 | ENV UID 911 |
19 | ENV PORT 8080 | ||
19 | 20 | ||
20 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ | 21 | RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ |
21 | apk add -U darkhttpd | 22 | apk add -U darkhttpd |
22 | 23 | ||
23 | USER ${USER} | ||
24 | |||
25 | 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 | ||
26 | 26 | ||
27 | ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] \ No newline at end of file | 27 | USER ${USER} |
28 | EXPOSE ${PORT} | ||
29 | VOLUME [ "/www/config.yml", "/www/assets" ] | ||
30 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | ||
diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 7664f66..ef01d1f 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 | |||
@@ -25,13 +25,16 @@ ENV USER darkhttpd | |||
25 | ENV GROUP darkhttpd | 25 | ENV GROUP darkhttpd |
26 | ENV GID 911 | 26 | ENV GID 911 |
27 | ENV UID 911 | 27 | ENV UID 911 |
28 | ENV PORT 8080 | ||
28 | 29 | ||
29 | 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} && \ |
30 | apk add -U darkhttpd && \ | 31 | apk add -U darkhttpd && \ |
31 | rm /usr/bin/qemu-arm-static | 32 | rm /usr/bin/qemu-arm-static |
32 | 33 | ||
33 | USER ${USER} | ||
34 | |||
35 | 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 | ||
36 | 36 | ||
37 | ENTRYPOINT ["darkhttpd","/www/","--no-listing"] | 37 | USER ${USER} |
38 | EXPOSE ${PORT} | ||
39 | VOLUME [ "/www/config.yml", "/www/assets" ] | ||
40 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | ||
diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 index 0175341..7899027 100644 --- a/Dockerfile.arm64v8 +++ b/Dockerfile.arm64v8 | |||
@@ -25,13 +25,16 @@ ENV USER darkhttpd | |||
25 | ENV GROUP darkhttpd | 25 | ENV GROUP darkhttpd |
26 | ENV GID 911 | 26 | ENV GID 911 |
27 | ENV UID 911 | 27 | ENV UID 911 |
28 | ENV PORT 8080 | ||
28 | 29 | ||
29 | 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} && \ |
30 | apk add -U darkhttpd && \ | 31 | apk add -U darkhttpd && \ |
31 | rm /usr/bin/qemu-aarch64-static | 32 | rm /usr/bin/qemu-aarch64-static |
32 | 33 | ||
33 | USER ${USER} | ||
34 | |||
35 | 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 | ||
36 | 36 | ||
37 | ENTRYPOINT ["darkhttpd","/www/","--no-listing"] | 37 | USER ${USER} |
38 | EXPOSE ${PORT} | ||
39 | VOLUME [ "/www/config.yml", "/www/assets" ] | ||
40 | ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] | ||
diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..7623322 --- /dev/null +++ b/entrypoint.sh | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | yes n | cp -i /www/config.yml.dist /www/config.yml | ||
4 | while true; do echo n; done | cp -Ri /app/dist/www/assets /www/assets 2>/dev/null | ||
5 | |||
6 | darkhttpd /www/ --no-listing --port $PORT | ||