Skip to content

Commit f7bb1b1

Browse files
committed
use arch baseimage to pacstrap on x86_64
1 parent b72f0a2 commit f7bb1b1

1 file changed

Lines changed: 1 addition & 35 deletions

File tree

Dockerfile

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,7 @@
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

406
RUN \
417
mkdir -m 0755 -p \

0 commit comments

Comments
 (0)