eza: update to 0.19.3
[void-pkg.git] / common / container / Containerfile
blob6b5478cb6a3af2459ae7f5051ebc97f924779c48
1 # syntax=docker/dockerfile:1
2 FROM --platform=${BUILDPLATFORM} alpine:3.18 AS bootstrap
3 ARG TARGETPLATFORM
4 ARG MIRROR=https://repo-ci.voidlinux.org
5 ARG LIBC
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" \
14     -r /target
16 FROM --platform=${BUILDPLATFORM} bootstrap AS install
17 ARG TARGETPLATFORM
18 ARG MIRROR
19 ARG LIBC
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" \
26     -r /target \
27     base-chroot void-repo-bootstrap
29 FROM scratch AS image
30 COPY --link --from=install /target /
31 RUN \
32   install -dm1777 tmp; \
33   xbps-reconfigure -fa; \
34   rm -rf /var/cache/xbps/*
35 CMD ["/bin/sh"]