Skip to content

Commit

Permalink
Added ENV PORT options and EXPORT PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
GlennToms committed Jun 12, 2020
1 parent cad54a5 commit 481ab9a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ 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

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/

ENTRYPOINT ["darkhttpd","/www/", "--no-listing"]
EXPOSE ${PORT}
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
7 changes: 6 additions & 1 deletion Dockerfile.arm32v7
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ 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

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/

ENTRYPOINT ["darkhttpd","/www/","--no-listing"]
EXPOSE ${PORT}
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
7 changes: 6 additions & 1 deletion Dockerfile.arm64v8
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ 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

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/

ENTRYPOINT ["darkhttpd","/www/","--no-listing"]
EXPOSE ${PORT}
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]

0 comments on commit 481ab9a

Please sign in to comment.