Skip to content

Commit 45587a6

Browse files
committed
Rebuild locale.gen in the base aarch64 image
1 parent 4e9de98 commit 45587a6

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

dockerfiles/Dockerfile.aarch64

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
FROM 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

69
RUN pacman-key --init && pacman-key --populate archlinuxarm
710

811
RUN 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
1420
RUN 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)
4448
RUN echo "root:alarm" | chpasswd
4549

4650
RUN ln -sf /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
4751

4852
# Cleanup pacman-key init
4953
RUN 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
5261
RUN 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
###############################################
6574
FROM 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

Comments
 (0)