forked from extern/homer
Added entrypoint script and Dockerfile port&volume
This commit is contained in:
parent
5f71d1ea01
commit
29d6b359ab
@ -21,12 +21,10 @@ ENV PORT 8080
|
|||||||
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
|
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
|
||||||
apk add -U darkhttpd
|
apk add -U darkhttpd
|
||||||
|
|
||||||
RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
|
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
||||||
RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
|
COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
USER ${USER}
|
USER ${USER}
|
||||||
|
|
||||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
|
||||||
|
|
||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
VOLUME [ "/www/config.yml", "/www/assets" ]
|
||||||
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
||||||
|
@ -31,12 +31,10 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
|
|||||||
apk add -U darkhttpd && \
|
apk add -U darkhttpd && \
|
||||||
rm /usr/bin/qemu-arm-static
|
rm /usr/bin/qemu-arm-static
|
||||||
|
|
||||||
RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
|
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
||||||
RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
|
COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
USER ${USER}
|
USER ${USER}
|
||||||
|
|
||||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
|
||||||
|
|
||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
VOLUME [ "/www/config.yml", "/www/assets" ]
|
||||||
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
||||||
|
@ -31,12 +31,10 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
|
|||||||
apk add -U darkhttpd && \
|
apk add -U darkhttpd && \
|
||||||
rm /usr/bin/qemu-aarch64-static
|
rm /usr/bin/qemu-aarch64-static
|
||||||
|
|
||||||
RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
|
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
||||||
RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
|
COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
USER ${USER}
|
USER ${USER}
|
||||||
|
|
||||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
|
||||||
|
|
||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
VOLUME [ "/www/config.yml", "/www/assets" ]
|
||||||
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
|
||||||
|
6
entrypoint.sh
Normal file
6
entrypoint.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user