diff --git a/Dockerfile b/Dockerfile index 205d759..cd3ab11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,12 +16,15 @@ ENV USER darkhttpd ENV GROUP darkhttpd ENV GID 911 ENV UID 911 +ENV PORT 8080 RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ apk add -U darkhttpd -USER ${USER} - COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ +COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh -ENTRYPOINT ["darkhttpd","/www/", "--no-listing"] \ No newline at end of file +USER ${USER} +EXPOSE ${PORT} +VOLUME [ "/www/config.yml", "/www/assets" ] +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 ENV GROUP darkhttpd ENV GID 911 ENV UID 911 +ENV PORT 8080 RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ apk add -U darkhttpd && \ rm /usr/bin/qemu-arm-static -USER ${USER} - COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ +COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh -ENTRYPOINT ["darkhttpd","/www/","--no-listing"] +USER ${USER} +EXPOSE ${PORT} +VOLUME [ "/www/config.yml", "/www/assets" ] +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 ENV GROUP darkhttpd ENV GID 911 ENV UID 911 +ENV PORT 8080 RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \ apk add -U darkhttpd && \ rm /usr/bin/qemu-aarch64-static -USER ${USER} - COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/ +COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh -ENTRYPOINT ["darkhttpd","/www/","--no-listing"] +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 index 0000000..7623322 --- /dev/null +++ b/entrypoint.sh @@ -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