Merge pull request #87 from GlennToms/master

Added ENV PORT options and EXPORT PORT
This commit is contained in:
Bastien Wirtz 2020-06-19 08:01:44 -07:00 committed by GitHub
commit 638dee7704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 9 deletions

View File

@ -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"]
USER ${USER}
EXPOSE ${PORT}
VOLUME [ "/www/config.yml", "/www/assets" ]
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]

View File

@ -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"]

View File

@ -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"]

6
entrypoint.sh Normal file
View File

@ -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