Update Dockerfile to use static-web-server

This commit is contained in:
2026-01-10 21:27:20 +00:00
parent 9467d1d242
commit ce7ec4fa9a

View File

@@ -6,15 +6,13 @@ ENV SITE_DIR=/app/site
RUN mkdocs build -d $SITE_DIR
FROM caddy:alpine
USER root
RUN apk add --no-cache libcap && \
setcap -r /usr/bin/caddy && \
chmod +x /usr/bin/caddy
FROM joseluisq/static-web-server:2.40
ENV SERVER_PORT=8080
ENV SERVER_HOST=0.0.0.0
ENV SERVER_ROOT=/public
ENV SERVER_LOG_LEVEL=info
COPY --from=builder /app/site /srv
USER 1000
COPY --from=builder /app/site /public
RUN chmod -R 0444 /public
USER 65432
EXPOSE 8080
CMD ["caddy", "file-server", "--listen", ":8080"]