42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
FROM docker.io/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0
|
|
|
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
LABEL org.opencontainers.image.title="nginx"
|
|
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"
|
|
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
ARG TARGETVARIANT
|
|
|
|
RUN addgroup -g 101 -S nginx && \
|
|
adduser -S -D -H -u 101 -h /var/lib/nginx/html -s /sbin/nologin -G nginx -g nginx nginx && \
|
|
apk --update add --virtual .build-deps curl && \
|
|
apk --update --no-cache add nginx ca-certificates && \
|
|
apk --no-cache upgrade libcrypto3 libssl3 && \
|
|
rm -rf /var/www && \
|
|
rm -rf /etc/nginx/conf.d && \
|
|
touch /run/nginx.pid && \
|
|
chown nginx /run/nginx.pid && \
|
|
chown -R nginx /var/log/nginx && \
|
|
mkdir -p /var/cache/nginx && \
|
|
chown -R nginx /var/cache/nginx && \
|
|
chmod -R 750 /var/cache/nginx && \
|
|
chown -R nginx:nginx /var/lib/nginx/html && \
|
|
chmod -R 750 /var/lib/nginx/html && \
|
|
apk del .build-deps && \
|
|
rm -rf /var/cache/apk/* && \
|
|
rm -rf /tmp/*
|
|
|
|
ADD overlay/ /
|
|
|
|
EXPOSE 8080
|
|
STOPSIGNAL SIGTERM
|
|
|
|
WORKDIR /var/lib/nginx/html
|
|
USER 101
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|