2022-01-30 04:03:56 +01:00
|
|
|
# First stage - Download s6-overlay and unpack it
|
2024-05-14 23:26:56 +02:00
|
|
|
FROM --platform=${TARGETPLATFORM} alpine:3.19 AS downloader
|
2022-01-30 04:03:56 +01:00
|
|
|
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
|
|
|
|
# S6 Overlay
|
2022-01-30 04:15:47 +01:00
|
|
|
ARG S6_OVERLAY_VERSION="2.2.0.3"
|
|
|
|
ARG S6_OVERLAY_RELEASE="https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${TARGETPLATFORM}.tar.gz"
|
2022-01-30 04:03:56 +01:00
|
|
|
|
2022-01-30 04:15:47 +01:00
|
|
|
WORKDIR "/s6-overlay/"
|
|
|
|
|
|
|
|
RUN apk add --no-cache wget tar gzip \
|
|
|
|
&& wget -O /tmp/s6overlay.tar.gz $(echo ${S6_OVERLAY_RELEASE} | sed 's/linux\///g' | sed 's/arm64/aarch64/g' | sed 's/arm\/v7/armhf/g') \
|
2022-01-30 04:03:56 +01:00
|
|
|
&& tar xzf /tmp/s6overlay.tar.gz -C /s6-overlay
|
|
|
|
|
|
|
|
|
|
|
|
# Final stage
|
|
|
|
FROM scratch AS s6-rootfs
|
|
|
|
|
|
|
|
LABEL maintainer="Aleksandar Puharic <aleksandar@puharic.com>"
|
|
|
|
|
|
|
|
COPY --from=downloader ["/s6-overlay/", "/"]
|