1 # syntax=docker/dockerfile:1
2 FROM --platform=${BUILDPLATFORM} alpine:3.18 AS bootstrap
4 ARG MIRROR=https://repo-ci.voidlinux.org
6 RUN apk add ca-certificates curl && \
7 curl "${MIRROR}/static/xbps-static-static-0.59_5.$(uname -m)-musl.tar.xz" | tar vJx
8 COPY common/repo-keys/* /target/var/db/xbps/keys/
9 COPY common/container/setup.sh /bootstrap/setup.sh
10 RUN --mount=type=cache,sharing=locked,target=/target/var/cache/xbps,id=repocache-${LIBC} \
11 . /bootstrap/setup.sh; \
12 XBPS_TARGET_ARCH=${ARCH} xbps-install -S \
13 -R "${REPO}" -R "${REPO}/bootstrap" \
16 FROM --platform=${BUILDPLATFORM} bootstrap AS install
20 COPY --from=bootstrap /target /target
21 COPY common/container/noextract.conf /target/etc/xbps.d/noextract.conf
22 RUN --mount=type=cache,sharing=locked,target=/target/var/cache/xbps,id=repocache-${LIBC} \
23 . /bootstrap/setup.sh; \
24 XBPS_TARGET_ARCH=${ARCH} xbps-install -y \
25 -R "${REPO}" -R "${REPO}/bootstrap" \
27 base-chroot void-repo-bootstrap
30 COPY --link --from=install /target /
32 install -dm1777 tmp; \
33 xbps-reconfigure -fa; \
34 rm -rf /var/cache/xbps/*