Files
linuxkit/blueprints/docker-for-mac/base.yml
Justin Cormack b52fcb71a1 Add swap to the Docker for Mac blueprint
We always had 1G swap to work better with small memory setups, but this
was omitted in the update to LinuxKit.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-21 14:50:27 -07:00

86 lines
3.7 KiB
YAML

# This is a blueprint for building the open source components of Docker for Mac
kernel:
image: linuxkit/kernel:4.9.51
cmdline: "console=ttyS0 page_poison=1"
init:
- linuxkit/vpnkit-expose-port:fa4ab4ac78b83fe392e39b861b4114c3bb02d170 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
- linuxkit/init:6fe9d31a53bbd200183bb31edd795305e868d5a7
- linuxkit/runc:a1b564248a0d0b118c11e61db9f84ecf41dd2d2a
- linuxkit/containerd:ad6710e069cb538c76314a28e09d6b49958c88e0
- linuxkit/ca-certificates:e44b0a66df5a102c0e220f0066b0d904710dcb10
onboot:
# support metadata for optional config in /var/config
- name: metadata
image: linuxkit/metadata:da3138079c168e0c5608d8f3853366c113ed91d2
- 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"]
# make a swap file on the mounted disk
- name: swap
image: linuxkit/swap:3881b1e0fadb7765d2fa85d03563c887ab9335a6
command: ["/swap.sh", "--path", "/var/lib/swap", "--size", "1024M"]
# 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:d4408777ed6b6e6e562a5d4938fd09804324b33e
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:bf6872ce0a9f3ab519b3e502cc41ba3958bda2a6
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