# This is a blueprint for building the open source components of Docker for Mac kernel: image: linuxkit/kernel:4.9.39 cmdline: "console=ttyS0 page_poison=1" init: - linuxkit/vpnkit-expose-port:e2b49a6c56fbf876ea24f0a5ce4ccae5f940d1be # install vpnkit-expose-port and vpnkit-iptables-wrapper on host - linuxkit/init:a19363d2546205d4613a52371414f79c06d7070e - linuxkit/runc:d5cbeb95bdafedb82ad2cf11cff1a5da7fcae630 - linuxkit/containerd:e33e0534d6fca88e1eb86897a1ea410b4a5d722e onboot: # support metadata for optional config in /var/config - name: metadata image: linuxkit/metadata:428093dd1c4178e8ba1952af44b46c0fd16f8e79 - name: sysctl image: linuxkit/sysctl:d1a43c7c91e92374766f962dc8534cf9508756b0 - name: sysfs image: linuxkit/sysfs:006a65b30cfdd9d751d7ab042fde7eca2c3bc9dc - name: binfmt image: linuxkit/binfmt:0bde4ebd422099f45c5ee03217413523ad2223e5 # Format and mount the disk image in /var/lib/docker - name: format image: linuxkit/format:84a997e69051a1bf05b7c1926ab785bb07932954 - name: mount image: linuxkit/mount:ac8939c4102f97c084d9ddfd445c1908fce6d768 command: ["/mount.sh", "/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:4b7b8bb024cebb1bbb9c8026d44d7cbc8e202c41 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:97c5e2c8ebad23c2ed743366b475b5c15c42f70e env: - INSECURE=true # Run ntpd to keep time synchronised in the VM - name: ntpd image: linuxkit/openntpd:19370f5d9bec84eb91073b7196b732f1301d9c90 # 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