Fix no mirrorlist in built image

This commit is contained in:
Menci 2021-12-08 02:34:48 +08:00
parent 864d88e36a
commit 67acf5e440
No known key found for this signature in database
GPG key ID: 175973D9764BC89F
5 changed files with 13 additions and 8 deletions

View file

@ -5,6 +5,8 @@ COPY files /files
RUN \
apk add arch-install-scripts pacman-makepkg curl && \
cat /files/repos-$TARGETARCH >> /etc/pacman.conf && \
mkdir -p /etc/pacman.d && \
cp /files/mirrorlist-$TARGETARCH /etc/pacman.d/mirrorlist && \
if [[ "$TARGETARCH" == "amd64" ]]; then \
apk add zstd && \
mkdir /tmp/archlinux-keyring && \
@ -19,6 +21,7 @@ RUN \
pacman-key --populate && \
mkdir /rootfs && \
/files/pacstrap-docker /rootfs $PACKAGE_GROUP && \
cp /etc/pacman.d/mirrorlist /rootfs/etc/pacman.d/mirrorlist && \
echo "en_US.UTF-8 UTF-8" > /rootfs/etc/locale.gen && \
echo "LANG=en_US.UTF-8" > /rootfs/etc/locale.conf && \
chroot /rootfs locale-gen && \