]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Added entrypoint script and Dockerfile port&volume 87/head
authorGlenn Toms <Glenn@glenntoms.gg>
Thu, 18 Jun 2020 14:46:33 +0000 (15:46 +0100)
committerGlenn Toms <Glenn@glenntoms.gg>
Thu, 18 Jun 2020 14:46:33 +0000 (15:46 +0100)
Dockerfile
Dockerfile.arm32v7
Dockerfile.arm64v8
entrypoint.sh [new file with mode: 0644]

index 73519e0f5ac52e6aa5ba69f25d622d43d7aa958b..cd3ab118cc5e32906aef57a14312b63745b7af7a 100644 (file)
@@ -21,12 +21,10 @@ ENV PORT 8080
 RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
     apk add -U darkhttpd
 
-RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
-RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
-
-USER ${USER}
-
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
+COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
 
+USER ${USER}
 EXPOSE ${PORT}
+VOLUME [ "/www/config.yml", "/www/assets" ]
 ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
index 952ecb7b0db8e8f375e1868c195344a9d99e8298..ef01d1fb2dbf1dc3ba5a21e0c30a743990d7a0fc 100644 (file)
@@ -31,12 +31,10 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
     apk add -U darkhttpd && \
     rm /usr/bin/qemu-arm-static
 
-RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
-RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
-
-USER ${USER}
-
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
+COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
 
+USER ${USER}
 EXPOSE ${PORT}
+VOLUME [ "/www/config.yml", "/www/assets" ]
 ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
index d9c8aabce7313eeaa783f78961411b8500c70bed..7899027743a20f9b55751457b98bf8d4c9a9742b 100644 (file)
@@ -31,12 +31,10 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
     apk add -U darkhttpd && \
     rm /usr/bin/qemu-aarch64-static
 
-RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
-RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
-
-USER ${USER}
-
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
+COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
 
+USER ${USER}
 EXPOSE ${PORT}
+VOLUME [ "/www/config.yml", "/www/assets" ]
 ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100644 (file)
index 0000000..7623322
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+yes n | cp -i /www/config.yml.dist /www/config.yml
+while true; do echo n; done | cp -Ri /app/dist/www/assets /www/assets 2>/dev/null
+
+darkhttpd /www/ --no-listing --port $PORT