Skip to content

Commit

Permalink
Merge pull request #87 from GlennToms/master
Browse files Browse the repository at this point in the history
Added ENV PORT options and EXPORT PORT
  • Loading branch information
bastienwirtz authored Jun 19, 2020
2 parents aac8179 + 29d6b35 commit 638dee7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
9 changes: 6 additions & 3 deletions Dockerfile.arm32v7
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
9 changes: 6 additions & 3 deletions Dockerfile.arm64v8
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 638dee7

Please sign in to comment.