1
0
forked from BgLUG/bglug.it
bglug.it/Dockerfile
paspo 830e51ce87 fix container image (#137)
fix #135

Reviewed-on: BgLUG/bglug.it#137
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-07-21 15:50:44 +00:00

26 lines
595 B
Docker

FROM git.libreschool.org/bglug/hugo-extended:latest AS hugobuild
COPY . /src
RUN \
hugo -s /src --gc --minify
FROM alpine:latest
RUN \
apk -U upgrade && \
apk add nginx curl logrotate && \
mkdir -p /wwwroot /logs && \
chown -R nginx:www-data /wwwroot /logs && \
chmod -R a-x,a=rX,ug+w /wwwroot /logs
COPY docker/rootfs /
COPY --from=hugobuild --chown=nginx:www-data --chmod=a-x,a=rX,ug+w /src/public /wwwroot/
# config test
RUN nginx -t
HEALTHCHECK --timeout=10s CMD curl --silent --fail -o /dev/null http://127.0.0.1:80/
ENTRYPOINT [ "/bin/sh", "/app/entrypoint.sh" ]