11FROM ghcr.io/devducks/archlinuxarm-basic:latest AS builder
22
3- ARG KERNEL
4- ARG SERIAL_TTY=ttyAMA1
3+ RUN printf 'Server = http://dk.mirror.archlinuxarm.org/$arch/$repo\n\
4+ Server = http://de3.mirror.archlinuxarm.org/$arch/$repo\n\
5+ Server = http://eu.mirror.archlinuxarm.org/$arch/$repo\n\
6+ Server = http://fl.us.mirror.archlinuxarm.org/$arch/$repo\n' \
7+ > /etc/pacman.d/mirrorlist
58
69RUN pacman-key --init && pacman-key --populate archlinuxarm
710
811RUN pacman -Syu --noconfirm
912
10- # Install now the linux-rpi (Kernel for RPi)
11- RUN pacman -Sy ${KERNEL} openssh --noconfirm
13+ # Hack, since we used Alpine to bootstrap, /etc/locale.gen is not complete,
14+ # remove it and reinstalling glibc will fix this issue
15+ RUN rm /etc/locale.gen
16+
17+ RUN pacman -Sy glibc linux-aarch64 nano openssh --noconfirm
1218
1319# Prepare network to be started with systemd-networkd with dhcp
1420RUN mkdir -p /etc/systemd/network && \
@@ -39,15 +45,18 @@ RUN mkdir -p /etc/ssh/sshd_config.d && \
3945 'ClientAliveCountMax 2' \
4046 > /etc/ssh/sshd_config.d/10-root-password.conf
4147
42- # Set root password interactively or fixed
43- # (replace "changeme" with your actual password)
4448RUN echo "root:alarm" | chpasswd
4549
4650RUN ln -sf /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
4751
4852# Cleanup pacman-key init
4953RUN rm -rf /etc/pacman.d/gnupg*
5054
55+ ####################################
56+ # Only needed to retrieve a rootfs #
57+ ####################################
58+ FROM builder AS rootfs-builder
59+
5160# Create rootfs
5261RUN tar -cpf /rootfs.tar \
5362 --numeric-owner --xattrs --acls --one-file-system \
@@ -63,4 +72,4 @@ RUN tar -cpf /rootfs.tar \
6372# EXPORT-ONLY: tarball artifact stage
6473###############################################
6574FROM scratch AS export
66- COPY --from=builder /rootfs.tar /archlinuxarm-rpi -aarch64-rootfs.tar
75+ COPY --from=rootfs- builder /rootfs.tar /archlinuxarm-aarch64-rootfs.tar
0 commit comments