Use the corresponding s6 binary for the built arch - fixes #298

This commit is contained in:
Jamie Curnow
2020-02-21 10:52:43 +10:00
parent a1cebb889c
commit b7e1e4fd9e
2 changed files with 39 additions and 3 deletions

View File

@ -5,6 +5,8 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} jc21/alpine-nginx-full:node
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG BUILD_VERSION
ARG BUILD_COMMIT
ARG BUILD_DATE
@ -22,8 +24,8 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
ENV NPM_BUILD_VERSION="${BUILD_VERSION}" NPM_BUILD_COMMIT="${BUILD_COMMIT}" NPM_BUILD_DATE="${BUILD_DATE}"
# s6 overlay
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" \
&& tar -xzf /tmp/s6-overlay-amd64.tar.gz -C /
COPY scripts/install-s6 /tmp/install-s6
RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6
EXPOSE 80
EXPOSE 81
@ -43,4 +45,4 @@ RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf
VOLUME [ "/data", "/etc/letsencrypt" ]
CMD [ "/init" ]
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health
HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health