use newer s6 version

This commit is contained in:
Sebastian Hugentobler 2022-02-14 11:05:44 +01:00
parent 609838eb63
commit c7491febdb

View File

@ -1,30 +1,31 @@
FROM alpine:3.15 AS builder
LABEL maintainer="Sebastian Hugentobler <sebastian@vanwa.ch>"
ARG TARGETPLATFORM
ENV S6_OVERLAY_VERSION=3.0.0.2
ENV SHA256_SUM_NOARCH=17880e4bfaf6499cd1804ac3a6e245fd62bc2234deadf8ff4262f4e01e3ee521
ENV SHA256_SUM=a4c039d1515812ac266c24fe3fe3c00c48e3401563f7f11d09ac8e8b4c2d0b0c
ENV S6_OVERLAY_VERSION=2ef4d7a44b6b9c5829544241e1ea3dc247032599
RUN apk --no-cache add \
bash
git \
make \
binutils \
tar \
xz
RUN wget "https://github.com/just-containers/s6-overlay/releases/download/v$S6_OVERLAY_VERSION/s6-overlay-noarch-$S6_OVERLAY_VERSION.tar.xz"
RUN echo "$SHA256_SUM_NOARCH s6-overlay-noarch-$S6_OVERLAY_VERSION.tar.xz" | sha256sum -c - || exit 1
RUN git clone https://github.com/just-containers/s6-overlay.git /src
WORKDIR /src
RUN git checkout "$S6_OVERLAY_VERSION"
RUN wget "https://github.com/just-containers/s6-overlay/releases/download/v$S6_OVERLAY_VERSION/s6-overlay-x86_64-$S6_OVERLAY_VERSION.tar.xz"
RUN echo "$SHA256_SUM s6-overlay-x86_64-$S6_OVERLAY_VERSION.tar.xz" | sha256sum -c - || exit 1
RUN make ARCH=x86_64-linux-musl
RUN mkdir /overlay
RUN tar -Jxpf s6-overlay-noarch-$S6_OVERLAY_VERSION.tar.xz -C /overlay
RUN tar -Jxpf s6-overlay-x86_64-$S6_OVERLAY_VERSION.tar.xz -C /overlay
FROM alpine:3.15
ENV LANG=en_US.UTF-8
ENV S6_KEEP_ENV=1
ENV PATH="$PATH:/command"
ENV S6_GLOBAL_PATH="$PATH"
COPY --from=builder /overlay /
COPY --from=builder /src/output/rootfs-overlay-noarch /
COPY --from=builder /src/output/rootfs-overlay-x86_64-linux-musl /
RUN apk --no-cache add \
syslog-ng