nginx/Containerfile.multiarch

40 lines
1.4 KiB
Plaintext
Raw Normal View History

FROM docker.io/alpine:3.20@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0
2019-09-28 19:25:17 +02:00
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"
2019-09-28 19:25:17 +02:00
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
2024-07-19 12:09:39 +02:00
RUN addgroup -g 1001 -S nginx && \
adduser -S -D -H -u 1001 -h /var/www -s /sbin/nologin -G nginx -g nginx nginx && \
2019-09-28 19:25:17 +02:00
apk --update add --virtual .build-deps curl && \
2024-07-19 12:09:39 +02:00
apk --update --no-cache add openresty ca-certificates && \
apk --no-cache upgrade libcrypto3 libssl3 && \
apk del .build-deps && \
rm -rf /var/www && \
2019-09-28 19:25:17 +02:00
rm -rf /etc/nginx/conf.d && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
ADD overlay/ /
RUN mkdir -p /var/tmp/nginx /var/cache/nginx && \
chown -R nginx /var/tmp/nginx /var/cache/nginx && \
2024-07-19 12:09:39 +02:00
chown -R nginx:nginx /usr/lib/nginx/nginx/html && \
chown -R root:nginx /etc/nginx /etc/nginx/conf.d && \
chmod -R 640 /etc/nginx /etc/nginx/conf.d && \
2024-07-19 12:09:39 +02:00
chmod 750 /usr/lib/nginx/nginx/html /var/cache/nginx /etc/nginx /etc/nginx/conf.d
2019-09-28 19:25:17 +02:00
EXPOSE 8080
2019-09-28 19:25:17 +02:00
STOPSIGNAL SIGTERM
2024-07-19 12:09:39 +02:00
WORKDIR /usr/lib/nginx/nginx/html
CMD ["nginx", "-e", "stderr", "-g", "daemon off;"]