mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-11-02 09:52:38 +00:00
87 lines
3.6 KiB
YAML
87 lines
3.6 KiB
YAML
# This is a blueprint for building the open source components of Docker for Mac
|
|
kernel:
|
|
image: linuxkit/kernel:4.9.40
|
|
cmdline: "console=ttyS0 page_poison=1"
|
|
init:
|
|
- linuxkit/vpnkit-expose-port:e2b49a6c56fbf876ea24f0a5ce4ccae5f940d1be # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
|
|
- linuxkit/init:4dcee04c04c900a5796dc719f8d16fea7e771059
|
|
- linuxkit/runc:842318b6ab524783554428c89a27d95af7bd2844
|
|
- linuxkit/containerd:1ff17c0908bed91a7bff252fba2e3d360d05a3de
|
|
onboot:
|
|
# support metadata for optional config in /var/config
|
|
- name: metadata
|
|
image: linuxkit/metadata:f5d4299909b159db35f72547e4ae70bd76c42c6c
|
|
- name: sysctl
|
|
image: linuxkit/sysctl:3f7a3f6f9e7e1d3f245c766fcf5c2b9e97382cfb
|
|
- name: sysfs
|
|
image: linuxkit/sysfs:006a65b30cfdd9d751d7ab042fde7eca2c3bc9dc
|
|
- name: binfmt
|
|
image: linuxkit/binfmt:257b5174a8e33bc62d5448cc026d72cae3713628
|
|
# Format and mount the disk image in /var/lib/docker
|
|
- name: format
|
|
image: linuxkit/format:efafddf9bc6165b5efaf09c532c15a1100a10e61
|
|
- name: mount
|
|
image: linuxkit/mount:54990a6a69cb3ead4da8a9c1f0b651e27aea8d3f
|
|
command: ["/usr/bin/mountie", "/var/lib"]
|
|
# create docker dir on mounted drive if it doesn't exist
|
|
- name: mkdir-docker
|
|
image: alpine:3.6
|
|
binds:
|
|
- /var/lib:/host_var_lib
|
|
command: ["sh", "-c", "mkdir -p /host_var_lib/docker"]
|
|
# mount-vpnkit mounts the 9p share used by vpnkit to coordinate port forwarding
|
|
- name: mount-vpnkit
|
|
image: alpine:3.6
|
|
binds:
|
|
- /var/:/host_var:rbind,rshared
|
|
capabilities:
|
|
- CAP_SYS_ADMIN
|
|
rootfsPropagation: shared
|
|
command: ["sh", "-c", "mkdir -p /host_var/vpnkit/port && mount -v -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 port /host_var/vpnkit"]
|
|
# move logs to the mounted disk (this is a temporary fix until we can limit the log sizes)
|
|
- name: move-logs
|
|
image: alpine:3.6
|
|
binds:
|
|
- /var:/host_var
|
|
command: ["sh", "-c", "mv -v /host_var/log /host_var/lib && ln -vs /var/lib/log /host_var/log"]
|
|
- name: dhcpcd
|
|
image: linuxkit/dhcpcd:17423c1ccced74e3c005fd80486e8177841fe02b
|
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
|
services:
|
|
# Enable acpi to shutdown on power events
|
|
- name: acpid
|
|
image: linuxkit/acpid:1966310cb75e28ffc668863a6577ee991327f918
|
|
# Enable getty for easier debugging
|
|
- name: getty
|
|
image: linuxkit/getty:58620cff1b0bf8b5d144d087602115e996f18a02
|
|
env:
|
|
- INSECURE=true
|
|
# Run ntpd to keep time synchronised in the VM
|
|
- name: ntpd
|
|
image: linuxkit/openntpd:2874b66c9fa51fa5b4d11c8b50441eb94ee22a5a
|
|
# VSOCK to unix domain socket forwarding. Forwards guest /var/run/docker.sock
|
|
# to a socket on the host.
|
|
- name: vsudd
|
|
image: linuxkit/vsudd:adad4b6ab7529b6b95339eb0752b0c81a218d185
|
|
binds:
|
|
- /var/run:/var/run
|
|
command: ["/vsudd", "-inport", "2376:unix:/var/run/docker.sock"]
|
|
# vpnkit-forwarder forwards network traffic to/from the host via VSOCK port 62373.
|
|
# It needs access to the vpnkit 9P coordination share
|
|
- name: vpnkit-forwarder
|
|
image: linuxkit/vpnkit-forwarder:9c1545e7b093d1210118de7661d7346393ec195b
|
|
binds:
|
|
- /var/vpnkit:/port
|
|
net: host
|
|
command: ["/vpnkit-forwarder", "-vsockPort", "62373"]
|
|
# Monitor for image deletes and invoke a TRIM on the container filesystem
|
|
- name: trim-after-delete
|
|
image: linuxkit/trim-after-delete:2a5fcbe080cd4a45bd75c2ea3856c069475d706d
|
|
# When the host resumes from sleep, force a clock resync
|
|
- name: host-timesync-daemon
|
|
image: linuxkit/host-timesync-daemon:e6c15e6ef75d302c1c22827bac249598fb365a83
|
|
|
|
trust:
|
|
org:
|
|
- linuxkit
|