File tree 2 files changed +39
-3
lines changed
2 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
FROM --platform=${TARGETPLATFORM:-linux/amd64} jc21/alpine-nginx-full:node
7
7
8
+ ARG TARGETPLATFORM
9
+ ARG BUILDPLATFORM
8
10
ARG BUILD_VERSION
9
11
ARG BUILD_COMMIT
10
12
ARG BUILD_DATE
@@ -22,8 +24,8 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
22
24
ENV NPM_BUILD_VERSION="${BUILD_VERSION}" NPM_BUILD_COMMIT="${BUILD_COMMIT}" NPM_BUILD_DATE="${BUILD_DATE}"
23
25
24
26
# s6 overlay
25
- RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-amd64.tar.gz" \
26
- && tar -xzf /tmp/s6-overlay-amd64.tar.gz -C /
27
+ COPY scripts/install-s6 /tmp/install-s6
28
+ RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
27
29
28
30
EXPOSE 80
29
31
EXPOSE 81
@@ -43,4 +45,4 @@ RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf
43
45
VOLUME [ "/data" , "/etc/letsencrypt" ]
44
46
CMD [ "/init" ]
45
47
46
- HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
48
+ HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+
3
+ # Note: This script is designed to be run inside a Docker Build for a container
4
+
5
+ CYAN=' \E[1;36m'
6
+ YELLOW=' \E[1;33m'
7
+ BLUE=' \E[1;34m'
8
+ GREEN=' \E[1;32m'
9
+ RESET=' \E[0m'
10
+
11
+ S6_OVERLAY_VERSION=1.22.1.0
12
+ TARGETPLATFORM=$1
13
+
14
+ # Determine the correct binary file for the architecture given
15
+ case $TARGETPLATFORM in
16
+ linux/arm64)
17
+ S6_ARCH=aarch64
18
+ ;;
19
+
20
+ linux/arm/v7)
21
+ S6_ARCH=armhf
22
+ ;;
23
+
24
+ * )
25
+ S6_ARCH=amd64
26
+ ;;
27
+ esac
28
+
29
+ echo -e " ${BLUE} ❯ ${CYAN} Installing S6-overlay v${S6_OVERLAY_VERSION} for ${YELLOW}${TARGETPLATFORM} (${S6_ARCH} )${RESET} "
30
+
31
+ curl -L -o " /tmp/s6-overlay-${S6_ARCH} .tar.gz" " https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION} /s6-overlay-${S6_ARCH} .tar.gz" \
32
+ && tar -xzf " /tmp/s6-overlay-${S6_ARCH} .tar.gz" -C /
33
+
34
+ echo -e " ${BLUE} ❯ ${GREEN} S6-overlay install Complete${RESET} "
You can’t perform that action at this time.
0 commit comments