File tree Expand file tree Collapse file tree 2 files changed +39
-3
lines changed Expand file tree Collapse file tree 2 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 55
66FROM --platform=${TARGETPLATFORM:-linux/amd64} jc21/alpine-nginx-full:node
77
8+ ARG TARGETPLATFORM
9+ ARG BUILDPLATFORM
810ARG BUILD_VERSION
911ARG BUILD_COMMIT
1012ARG BUILD_DATE
@@ -22,8 +24,8 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
2224ENV NPM_BUILD_VERSION="${BUILD_VERSION}" NPM_BUILD_COMMIT="${BUILD_COMMIT}" NPM_BUILD_DATE="${BUILD_DATE}"
2325
2426# 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
2729
2830EXPOSE 80
2931EXPOSE 81
@@ -43,4 +45,4 @@ RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf
4345VOLUME [ "/data" , "/etc/letsencrypt" ]
4446CMD [ "/init" ]
4547
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