Dockerfile aktualisiert
Some checks failed
Docker Build / Build amd64 & arm64 (push) Failing after 12s

This commit is contained in:
2026-02-05 12:09:51 +00:00
parent 026a32dcb8
commit 7096b82e65

View File

@@ -1,38 +1,49 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM alpine:3.23 FROM alpine:3.23 AS rootfs-stage
ARG TARGETARCH
ARG S6_OVERLAY_VERSION="3.2.2.0" ARG S6_OVERLAY_VERSION="3.2.2.0"
ARG ROOTFS=/root-out ARG ROOTFS=/root-out
ARG REL=v3.23 ARG REL=v3.23
ARG ARCH=x86_64
ARG MIRROR=http://dl-cdn.alpinelinux.org/alpine ARG MIRROR=http://dl-cdn.alpinelinux.org/alpine
ARG PACKAGES=alpine-baselayout,alpine-keys,apk-tools,busybox,libc-utils,bash,xz,curl,ca-certificates ARG PACKAGES=alpine-baselayout,\
alpine-keys,\
apk-tools,\
busybox,\
libc-utils
# map arch # install packages
RUN case "${TARGETARCH}" in \ RUN \
amd64) echo "x86_64" > /arch ;; \ apk add --no-cache \
arm64) echo "aarch64" > /arch ;; \ bash \
*) echo "unsupported arch" && exit 1 ;; \ xz
esac
# build rootfs # build rootfs
RUN apk add --no-cache ${PACKAGES//,/ } RUN \
mkdir -p "${ROOTFS}/etc/apk" && \
{ \
echo "${MIRROR}/${REL}/main"; \
echo "${MIRROR}/${REL}/community"; \
} > "${ROOTFS}/etc/apk/repositories" && \
apk --root "${ROOTFS}" --no-cache --keys-dir /etc/apk/keys add --arch ${ARCH} --initdb ${PACKAGES//,/ } && \
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
# s6 overlay # add s6 overlay
RUN ARCH="$(cat /arch)" && \ ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
curl -fsSL https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz \ RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz
| tar -C / -Jxpf - && \ ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${ARCH}.tar.xz /tmp
curl -fsSL https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${ARCH}.tar.xz \ RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${ARCH}.tar.xz
| tar -C / -Jxpf -
# add s6 optional symlinks # add s6 optional symlinks
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz && unlink /root-out/usr/bin/with-contenv
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz
# Runtime stage # Runtime stage
FROM scratch
COPY --from=rootfs-stage /root-out/ /
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
ARG MODS_VERSION="v3" ARG MODS_VERSION="v3"