-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
30 lines (23 loc) · 948 Bytes
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM --platform=$BUILDPLATFORM nginx:%%S6_NGINX_VERSION%%
LABEL "org.opencontainers.image.title"="nginx-s6"
LABEL "org.opencontainers.image.description"="Nginx with s6-overlay"
LABEL "org.opencontainers.image.url"="https://github.com/socheatsok78/docker-nginx-s6"
LABEL "org.opencontainers.image.source"="https://github.com/socheatsok78/docker-nginx-s6"
LABEL "org.opencontainers.image.version"="%%S6_NGINX_VERSION%%"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL version="%%S6_NGINX_VERSION%%"
LABEL maintainer="Socheat Sok <[email protected]>"
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
ENV S6_NGINX_VERSION=%%S6_NGINX_VERSION%%
ENV S6_OVERLAY_VERSION=%%S6_OVERLAY_VERSION%%
ADD rootfs /
RUN chmod +x /etc/cont-init.d/00-nginx-init.sh
# Add s6-overlay
RUN /s6-overlay-installer.sh $TARGETARCH && \
rm /s6-overlay-installer.sh
ENTRYPOINT ["/init"]
CMD ["nginx", "-g", "daemon off;"]