File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1
22
3- FROM alpine:3 AS rootfs-stage
4-
5- ARG ARCH_VERSION
6-
7- # install packages
8- RUN \
9- apk add --no-cache \
10- bash \
11- curl \
12- jq \
13- tar \
14- tzdata \
15- xz \
16- zstd
17-
18- # grab latest rootfs
19- RUN \
20- echo "**** grab download URL ****" && \
21- if [ -z ${ARCH_VERSION+x} ]; then \
22- ARCH_VERSION=$(curl -sL https://gitlab.archlinux.org/api/v4/projects/10185/releases \
23- | jq -r '.[0].tag_name' | sed 's/^v//g' ); \
24- fi && \
25- PACK_ID=$(curl -sL https://gitlab.archlinux.org/api/v4/projects/10185/packages?sort=desc | jq -r '.[] | select(.version == "' ${ARCH_VERSION}'") | .id' ) && \
26- TAR_ID=$(curl -sL https://gitlab.archlinux.org/api/v4/projects/10185/packages/${PACK_ID}/package_files | jq '.[] | select(.file_name == "base-' ${ARCH_VERSION}'.tar.zst") | .id' ) && \
27- echo "**** download/extract rootfs ****" && \
28- curl -o \
29- /rootfs.tar.zst -L \
30- https://gitlab.archlinux.org/archlinux/archlinux-docker/-/package_files/${TAR_ID}/download && \
31- mkdir /root-out && \
32- tar xf \
33- /rootfs.tar.zst -C \
34- /root-out
35-
363# pacstrap stage
37- FROM scratch AS pacstrap-stage
38- COPY --from=rootfs-stage /root-out/ /
4+ FROM archlinux:base AS pacstrap-stage
395
406RUN \
417 mkdir -m 0755 -p \
You can’t perform that action at this time.
0 commit comments