chore(dev): autologin to alpine and writable rootfs

This commit is contained in:
2025-11-14 13:59:34 -05:00
parent 2a9c9f6907
commit e0bd703511
7 changed files with 26 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 AS rootfs
RUN apk --no-cache add alpine-base tzdata
RUN apk --no-cache add alpine-base tzdata ifupdown-ng agetty
RUN rc-update add devfs sysinit && \
rc-update add dmesg sysinit && \
rc-update add mdev sysinit && \
@@ -7,6 +7,7 @@ RUN rc-update add devfs sysinit && \
rc-update add sysctl boot && \
rc-update add hostname boot && \
rc-update add bootmisc boot && \
rc-update add networking boot && \
rc-update add syslog boot && \
rc-update add mount-ro shutdown && \
rc-update add killprocs shutdown && \
@@ -14,9 +15,10 @@ RUN rc-update add devfs sysinit && \
ln -s /sbin/init /init && \
echo 'root:root' | chpasswd && \
echo 'sprout' > /etc/hostname && \
echo '' > /etc/motd && \
rm /etc/motd && \
ln -s /usr/share/zoneinfo/UTC /etc/localtime && \
echo 'hvc0::respawn:/sbin/getty -L hvc0 115200 vt100' >> /etc/inittab
echo 'hvc0::respawn:/sbin/agetty --autologin root -L hvc0 115200 vt100' >> /etc/inittab
COPY files/interfaces /etc/network/interfaces
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 AS build
COPY --from=rootfs / /rootfs