nginx-s3/Containerfile.multiarch

53 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

FROM docker.io/alpine:3.20@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d
2019-09-28 17:25:17 +00:00
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
2023-09-23 12:22:04 +00:00
LABEL org.opencontainers.image.title="nginx-s3"
2023-11-07 15:36:24 +00:00
LABEL org.opencontainers.image.url="https://gitea.rknet.org/container/nginx-s3"
LABEL org.opencontainers.image.source="https://gitea.rknet.org/container/nginx-s3"
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/container/nginx-s3"
2019-09-28 17:25:17 +00:00
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
2020-10-18 20:35:49 +00:00
ARG GOMPLATE_VERSION
2021-10-09 20:10:58 +00:00
ARG CONTAINER_LIBRARY
2020-10-18 20:35:49 +00:00
# renovate: datasource=github-releases depName=hairyhenderson/gomplate
ENV GOMPLATE_VERSION="${GOMPLATE_VERSION:-v4.1.0}"
2023-11-07 15:36:24 +00:00
# renovate: datasource=git-tags depName=https://gitea.rknet.org/container/container-library
2021-10-09 20:10:58 +00:00
ENV CONTAINER_LIBRARY="${CONTAINER_LIBRARY:-v0.1.3}"
2020-10-18 20:35:49 +00:00
2023-09-23 12:17:09 +00: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 17:25:17 +00:00
apk --update add --virtual .build-deps curl && \
2023-09-23 12:17:09 +00:00
apk --update --no-cache add inotify-tools ca-certificates && \
apk --update --no-cache add openresty --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community/ && \
apk --no-cache upgrade libcrypto3 libssl3 && \
2019-09-28 17:25:17 +00:00
rm -rf /etc/nginx/conf.d && \
2023-11-07 15:36:24 +00:00
curl -SsfL "https://gitea.rknet.org/container/container-library/releases/download/${CONTAINER_LIBRARY}/container-library.tar.gz" | tar xz -C / && \
curl -SsfL -o /usr/local/bin/gomplate "https://github.com/hairyhenderson/gomplate/releases/download/${GOMPLATE_VERSION}/gomplate_${TARGETOS}-${TARGETARCH}${TARGETVARIANT}" && \
2020-02-04 09:56:15 +00:00
chmod 755 /usr/local/bin/gomplate && \
2019-09-28 17:25:17 +00:00
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
ADD overlay/ /
RUN mkdir -p /var/www /etc/nginx-s3 /etc/nginx/conf.d /var/tmp/nginx /var/cache/nginx && \
touch /etc/nginx/conf.d/vhosts.conf && \
2023-09-24 22:35:09 +00:00
chown -R nginx /var/tmp/nginx /var/cache/nginx && \
2023-09-23 12:17:09 +00:00
chown -R nginx:nginx /var/www && \
chown -R root:nginx /etc/nginx /etc/nginx/conf.d && \
chmod -R 640 /etc/nginx /etc/nginx/conf.d && \
chmod 750 /var/www /var/cache/nginx /etc/nginx-s3 /etc/nginx /etc/nginx/conf.d
2023-09-23 12:17:09 +00:00
2019-09-28 17:25:17 +00:00
EXPOSE 8080
STOPSIGNAL SIGTERM
2023-09-23 12:17:09 +00:00
ENTRYPOINT ["/usr/local/bin/entrypoint", "server"]
WORKDIR /var/www
CMD []