blob: 655e7a9e7d498e296b7937f0cb69f3a5dc22e6ed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Arch Linux Base Image with systemd
FROM archlinux:latest AS base
LABEL maintainer="sinitax"
LABEL description="Arch Linux with systemd"
# Update system
RUN pacman -Syu --noconfirm
# Enable systemd-networkd and systemd-resolved
RUN systemctl enable systemd-networkd systemd-resolved
# Configure eth0 with DHCP (IPv4 and IPv6)
RUN printf '[Match]\nName=eth0\n\n[Network]\nDHCP=yes\nIPv6AcceptRA=yes\n' > /etc/systemd/network/20-eth0.network
# Configure DNS via systemd-resolved
RUN mkdir -p /etc/systemd/resolved.conf.d && \
printf '[Resolve]\nDNS=8.8.8.8 8.8.4.4 1.1.1.1\n' > /etc/systemd/resolved.conf.d/dns.conf
# Set up resolv.conf symlink and hostname on boot (can't modify during Docker build)
RUN printf 'L+ /etc/resolv.conf - - - - /run/systemd/resolve/stub-resolv.conf\nf /etc/hostname - - - - claude-vm\n' > /etc/tmpfiles.d/claude-vm.conf
CMD ["/sbin/init"]
|