fix Dockerfile
Some checks failed
/ release-and-build (push) Failing after 21s

This commit is contained in:
2026-03-16 15:51:44 +01:00
parent 4fb011e013
commit 3a7bb603f4

View File

@@ -1,10 +1,20 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
ARG BUILD_BASE_IMAGE=alpine:latest ARG BUILD_BASE_IMAGE=alpine:latest
FROM ${BUILD_BASE_IMAGE} AS rootfs-stage FROM ${BUILD_BASE_IMAGE} AS rootfs-stage
# environment ARG BUILD_APP_VERSION
ENV REL=${BUILD_DEBIAN_REL} ARG BUILD_S6_ARCH_amd64
ENV ARCH=${BUILD_DEBIAN_ARCH} ARG BUILD_S6_OVERLAY_VERSION
ARG ROOTFS=/root-out
ARG REL=${BUILD_APP_VERSION}
ARG ARCH=x86_64
ARG MIRROR=http://dl-cdn.alpinelinux.org/alpine
ARG PACKAGES=alpine-baselayout,\
alpine-keys,\
apk-tools,\
busybox,\
libc-utils
# install packages # install packages
RUN \ RUN \
@@ -14,32 +24,26 @@ RUN \
tzdata \ tzdata \
xz xz
# grab base tarball # build rootfs
RUN \ RUN \
mkdir /root-out && \ mkdir -p "${ROOTFS}/etc/apk" && \
curl -o \ { \
/rootfs.tar.gz -L \ echo "${MIRROR}/${REL}/main"; \
https://github.com/debuerreotype/docker-debian-artifacts/raw/refs/heads/dist-${ARCH}/${REL}/slim/oci/blobs/rootfs.tar.gz && \ echo "${MIRROR}/${REL}/community"; \
tar xf \ } > "${ROOTFS}/etc/apk/repositories" && \
/rootfs.tar.gz -C \ apk --root "${ROOTFS}" --no-cache --keys-dir /etc/apk/keys add --arch ${BUILD_S6_ARCH_amd64} --initdb ${PACKAGES//,/ } && \
/root-out && \ sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
rm -rf \
/root-out/var/log/*
# set version for s6 overlay
ARG S6_OVERLAY_VERSION=${BUILD_S6_OVERLAY_VERSION}
ARG S6_OVERLAY_ARCH=${BUILD_S6_ARCH_amd64}
# add s6 overlay # add s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp ADD https://github.com/just-containers/s6-overlay/releases/download/v${BUILD_S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz /tmp ADD https://github.com/just-containers/s6-overlay/releases/download/v${BUILD_S6_OVERLAY_VERSION}/s6-overlay-${BUILD_S6_ARCH_amd64}.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${BUILD_S6_ARCH_amd64}.tar.xz
# 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${BUILD_S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz && unlink /root-out/usr/bin/with-contenv 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${BUILD_S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz
######################### #########################