-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.machine
More file actions
38 lines (34 loc) · 1.22 KB
/
Copy pathDockerfile.machine
File metadata and controls
38 lines (34 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:26.04
ENV container=container
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dbus \
dnsmasq-base \
incus-base \
jq \
systemd \
systemd-sysv \
xfsprogs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# These units either fail outright or stall waiting for hardware that
# doesn't exist under Apple's `container` guest virtualization: no console
# gettys are attached, no hugepages/fuse-connections kernel interfaces are
# exposed, and (crucially) the guest kernel has no loadable-module support at
# all, so anything that tries to load a module fails immediately. Masking
# them avoids both boot-time stalls and permanent `systemctl
# is-system-running` degradation from units that can never succeed here.
RUN systemctl set-default multi-user.target \
&& systemctl enable incus.socket incus.service incus-startup.service \
&& systemctl mask \
console-getty.service \
dev-hugepages.mount \
sys-fs-fuse-connections.mount \
systemd-modules-load.service \
systemd-tmpfiles-setup.service \
systemd-update-utmp.service
STOPSIGNAL SIGRTMIN+3
CMD ["/usr/sbin/init"]