# This is a blueprint for building the open source components of Docker for Mac kernel: image: linuxkit/kernel:4.9.43 cmdline: "console=ttyS0 page_poison=1" init: - linuxkit/vpnkit-expose-port:fa4ab4ac78b83fe392e39b861b4114c3bb02d170 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host - linuxkit/init:c7d651da1a5e308c757bc61ce6a41804ea843426 - linuxkit/runc:838259153885c0c40460379d6cdb7baebaf3fa36 - linuxkit/containerd:09a21d6606a4011efebacff62a88b956ecac01be onboot: # support metadata for optional config in /var/config - name: metadata image: linuxkit/metadata:cec86f3e1c260c9eafefa80c262fceb40c182ddf - name: sysctl image: linuxkit/sysctl:154913b72c6f1f33eb408609fca9963628e8c051 - name: sysfs image: linuxkit/sysfs:3ae01a25583ee37a5ff8b09a0e569cb4bd8cf2e9 - name: binfmt image: linuxkit/binfmt:472eeba777d056c5f98fe074aa0f581c67ccc7ff # Format and mount the disk image in /var/lib/docker - name: format image: linuxkit/format:158d992b7bf7ab984100c697d7e72161ea7d7382 - name: mount image: linuxkit/mount:4fe245efb01384e42622c36302e13e386bbaeb08 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:f3f5413abb78fae9020e35bd4788fa93df4530b7 command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] services: # Enable acpi to shutdown on power events - name: acpid image: linuxkit/acpid:79e5c20de96e1633c9c40935b99dde45aefba37b # Enable getty for easier debugging - name: getty image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec env: - INSECURE=true # Run ntpd to keep time synchronised in the VM - name: ntpd image: linuxkit/openntpd:0d7befc79842849d0b88d6c3b64200e340d7cf67 # VSOCK to unix domain socket forwarding. Forwards guest /var/run/docker.sock # to a socket on the host. - name: vsudd image: linuxkit/vsudd:d40f65855dfc4fe4740ba5fb5d3282cbc2131715 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:42d80758e3b6a9f58cdfd25e53c775eebe951669 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:8e7aea3dc87bbb72cf56e62d8b8861ff93946480 # When the host resumes from sleep, force a clock resync - name: host-timesync-daemon image: linuxkit/host-timesync-daemon:625a906f2c3d9a3a2b8c856f062bc6c0d6b526bd trust: org: - linuxkit