mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-07 18:48:32 +00:00
93 lines
3.7 KiB
YAML
93 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.34"
|
|
cmdline: "console=ttyS0 page_poison=1"
|
|
init:
|
|
- linuxkit/init:36c56f0664d49c5a6adc1120d1bf5ba6ac30b389
|
|
- linuxkit/runc:291131ec026430371e7c36165c3f43734fbc2541
|
|
- linuxkit/containerd:b50181bc6e0084e5fcd6b6ad3cf433c4f66cae5a
|
|
onboot:
|
|
- name: sysctl
|
|
image: "linuxkit/sysctl:3aa6bc663c2849ef239be7d941d3eaf3e6fcc018"
|
|
- name: sysfs
|
|
image: "linuxkit/sysfs:b4091d81261f4582ff899a8510110fc4f2be2b49"
|
|
- name: binfmt
|
|
image: "linuxkit/binfmt:24e2b996f7d6ad20bfa9c9f1564a3c6172db47ce"
|
|
# Format and mount the disk image in /var/lib/docker
|
|
- name: format
|
|
image: "linuxkit/format:ba085fdcac31c383acee3b4b91d78eb7095e5ac3"
|
|
- name: mount
|
|
image: "linuxkit/mount:fe22dc5cbf109b4637b1caaafc76ccbf5140c3da"
|
|
command: ["/mount.sh", "/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"]
|
|
- name: dhcpcd
|
|
image: "linuxkit/dhcpcd:6c1ca76dbf808d5c27d10cbf22a8d4399be5c8ae"
|
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
|
services:
|
|
# Enable getty for easier debugging
|
|
- name: getty
|
|
image: "linuxkit/getty:6cbeee0392b0670053ce2bf05a5a0d67ec2bce05"
|
|
env:
|
|
- INSECURE=true
|
|
- name: rngd
|
|
image: "linuxkit/rngd:b50b22dd574c5377708977af769f053009fff6d5"
|
|
# Run ntpd to keep time synchronised in the VM
|
|
- name: ntpd
|
|
image: "linuxkit/openntpd:a4c642d52e985922fcd97db52e471db123cc6841"
|
|
# VSOCK to unix domain socket forwarding. Forwards guest /var/run/docker.sock
|
|
# to a socket on the host.
|
|
- name: vsudd
|
|
image: "linuxkit/vsudd:9e5882b4450a97836e113bcad231f497aa7bdba4"
|
|
binds:
|
|
- /var/run:/var/run
|
|
command: ["/vsudd", "-inport", "2375: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:e2776b82ddfe82ed7f90e55d7a2b424e62e9a279"
|
|
binds:
|
|
- /var/vpnkit:/port
|
|
net: host
|
|
command: ["/vpnkit-forwarder", "-vsockPort", "62373"]
|
|
# Run dockerd with the vpnkit userland proxy from the vpnkit-forwarder container.
|
|
# Bind mounts /var/run to allow vsudd to connect to docker.sock, /var/vpnkit
|
|
# for vpnkit coordination and /var/config/docker for the configuration file.
|
|
- name: docker-dfm
|
|
image: "linuxkit/docker-ce:9e125aa533108731d11f6d7ec17aba6ded0cb4eb"
|
|
capabilities:
|
|
- all
|
|
net: host
|
|
mounts:
|
|
- type: cgroup
|
|
options: ["rw","nosuid","noexec","nodev","relatime"]
|
|
binds:
|
|
- /var/lib/docker:/var/lib/docker
|
|
- /lib/modules:/lib/modules
|
|
- /var/vpnkit:/port
|
|
- /var/run:/var/run
|
|
- /var/config/docker:/var/config/docker
|
|
command: [ "/usr/bin/docker-init", "/usr/bin/dockerd", "--",
|
|
"--config-file", "/var/config/docker/daemon.json",
|
|
"--swarm-default-advertise-addr=eth0",
|
|
"--userland-proxy-path", "/usr/bin/vpnkit-expose-port",
|
|
"--storage-driver", "overlay2" ]
|
|
# Monitor for image deletes and invoke a TRIM on the container filesystem
|
|
- name: trim-after-delete
|
|
image: "linuxkit/trim-after-delete:6cc6131300c287fcd40041a28119fee2fc874539"
|
|
|
|
files:
|
|
- path: /var/config/docker/daemon.json
|
|
contents: '{ "debug": true }'
|
|
|
|
trust:
|
|
org:
|
|
- linuxkit
|