use prebuilt binaries

This commit is contained in:
Sebastian Hugentobler 2023-12-13 00:55:09 +01:00
parent e87453a975
commit 5b458e14d5
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

View File

@ -1,21 +1,25 @@
FROM docker.io/alpine:3.19 AS builder FROM docker.io/alpine:3.19 AS builder
LABEL maintainer="Sebastian Hugentobler <sebastian@vanwa.ch>" LABEL maintainer="Sebastian Hugentobler <sebastian@vanwa.ch>"
ENV S6_OVERLAY_VERSION=v3.1.6.2
RUN apk --no-cache add \ RUN apk --no-cache add \
git \ curl \
make \
binutils \
tar \ tar \
xz xz
RUN git clone https://github.com/just-containers/s6-overlay.git /src RUN mkdir /overlay
WORKDIR /src
RUN git checkout "$S6_OVERLAY_VERSION"
RUN make ARCH=$(arch)-linux-musl -j4 ENV S6_OVERLAY_VERSION=v3.1.6.2
RUN mv /src/output/rootfs-overlay-$(arch)-linux-musl /src/output/rootfs-overlay-arch ENV S6_HASH_noarch=05af2536ec4fb23f087a43ce305f8962512890d7c71572ed88852ab91d1434e3
ENV S6_HASH_aarch64=3fc0bae418a0e3811b3deeadfca9cc2f0869fb2f4787ab8a53f6944067d140ee
ENV S6_HASH_x86_64=95081f11c56e5a351e9ccab4e70c2b1c3d7d056d82b72502b942762112c03d1c
RUN curl -L -O https://github.com/just-containers/s6-overlay/releases/download/$S6_OVERLAY_VERSION/s6-overlay-noarch.tar.xz
RUN echo "$S6_HASH_noarch s6-overlay-noarch.tar.xz" | sha256sum -c - || exit 1
RUN tar xf s6-overlay-noarch.tar.xz -C /overlay --strip 1
RUN curl -L -O https://github.com/just-containers/s6-overlay/releases/download/$S6_OVERLAY_VERSION/s6-overlay-$(arch).tar.xz
RUN eval "echo \"\${S6_HASH_$(arch)} s6-overlay-$(arch).tar.xz\" | sha256sum -c -" || exit 1
RUN tar xf s6-overlay-$(arch).tar.xz -C /overlay --strip 1
FROM docker.io/alpine:3.19 FROM docker.io/alpine:3.19
@ -25,8 +29,7 @@ ENV S6_KEEP_ENV=1
ENV PATH="$PATH:/command" ENV PATH="$PATH:/command"
ENV S6_GLOBAL_PATH="$PATH" ENV S6_GLOBAL_PATH="$PATH"
COPY --from=builder /src/output/rootfs-overlay-noarch / COPY --from=builder /overlay /
COPY --from=builder /src/output/rootfs-overlay-arch /
RUN apk --no-cache add \ RUN apk --no-cache add \
syslog-ng \ syslog-ng \