2024-06-21 21:35:56 +00:00
|
|
|
FROM docker.io/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0
|
2019-09-28 17:25:17 +00:00
|
|
|
|
2020-12-20 21:47:43 +00:00
|
|
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.title="nginx"
|
2023-11-08 08:03:51 +00:00
|
|
|
LABEL org.opencontainers.image.url="https://gitea.rknet.org/container/nginx"
|
|
|
|
LABEL org.opencontainers.image.source="https://gitea.rknet.org/container/nginx"
|
|
|
|
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/container/nginx"
|
2019-09-28 17:25:17 +00:00
|
|
|
|
2023-01-15 16:08:31 +00:00
|
|
|
ARG TARGETOS
|
|
|
|
ARG TARGETARCH
|
|
|
|
ARG TARGETVARIANT
|
|
|
|
|
2019-09-28 17:25:17 +00:00
|
|
|
RUN addgroup -g 101 -S nginx && \
|
2024-07-18 19:46:25 +00:00
|
|
|
adduser -S -D -H -u 101 -h /var/lib/nginx/html -s /sbin/nologin -G nginx -g nginx nginx && \
|
2019-09-28 17:25:17 +00:00
|
|
|
apk --update add --virtual .build-deps curl && \
|
|
|
|
apk --update --no-cache add nginx ca-certificates && \
|
2023-11-14 14:27:25 +00:00
|
|
|
apk --no-cache upgrade libcrypto3 libssl3 && \
|
2024-07-18 20:55:57 +00:00
|
|
|
apk del .build-deps && \
|
2024-07-18 19:46:25 +00:00
|
|
|
rm -rf /var/www && \
|
2019-09-28 17:25:17 +00:00
|
|
|
rm -rf /etc/nginx/conf.d && \
|
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
rm -rf /tmp/*
|
|
|
|
|
|
|
|
ADD overlay/ /
|
|
|
|
|
2024-07-18 20:55:57 +00:00
|
|
|
RUN mkdir -p /var/tmp/nginx /var/cache/nginx && \
|
|
|
|
chown -R nginx /var/tmp/nginx /var/cache/nginx && \
|
|
|
|
chown -R nginx:nginx /var/lib/nginx/html && \
|
|
|
|
chown -R root:nginx /etc/nginx /etc/nginx/conf.d && \
|
|
|
|
chmod -R 640 /etc/nginx /etc/nginx/conf.d && \
|
|
|
|
chmod 750 /var/lib/nginx/html /var/cache/nginx /etc/nginx /etc/nginx/conf.d
|
|
|
|
|
2019-09-28 17:25:17 +00:00
|
|
|
EXPOSE 8080
|
2024-07-18 20:55:57 +00:00
|
|
|
|
2019-09-28 17:25:17 +00:00
|
|
|
STOPSIGNAL SIGTERM
|
|
|
|
|
2024-07-18 19:46:25 +00:00
|
|
|
WORKDIR /var/lib/nginx/html
|
2019-09-28 17:25:17 +00:00
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|