mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-15 19:11:35 +00:00
86 lines
3.7 KiB
YAML
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.56
|
|
cmdline: "console=ttyS0 page_poison=1"
|
|
init:
|
|
- linuxkit/vpnkit-expose-port:0832f0cfdfc02214680588a5018619cd1eb4b93f # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
|
|
- linuxkit/init:6b3755e47f00d6027321d3fca99a19af6504be75
|
|
- linuxkit/runc:52f92cb577879ce4cfe4e89be2d63af82523fc92
|
|
- linuxkit/containerd:ed8e8f92e24dd4b94260cf147594ae3fd13a2182
|
|
- linuxkit/ca-certificates:ea3c4c120f929f4f07ac8535d75933365b5e9582
|
|
onboot:
|
|
# support metadata for optional config in /var/config
|
|
- name: metadata
|
|
image: linuxkit/metadata:c385bb2dce56acf8b831bbf7fca3c8fc836ded66
|
|
- name: sysctl
|
|
image: linuxkit/sysctl:1644bf07edbcaf5ce0bb764fa925b544183547f9
|
|
- name: sysfs
|
|
image: linuxkit/sysfs:a844eb2ac09df07f5eda89d5588d76bf8d96cfca
|
|
- name: binfmt
|
|
image: linuxkit/binfmt:7b2fdd981f3cdb5d21961e7d584e600af5a934a0
|
|
# Format and mount the disk image in /var/lib/docker
|
|
- name: format
|
|
image: linuxkit/format:be811ded880af37a916f23bc9ddb274026ccc514
|
|
- name: mount
|
|
image: linuxkit/mount:ef2e2106212b2d333b548821191f04da984ef48f
|
|
command: ["/usr/bin/mountie", "/var/lib"]
|
|
# make a swap file on the mounted disk
|
|
- name: swap
|
|
image: linuxkit/swap:195ef5c89fcd68ff412ecb01a330e75503dc7b83
|
|
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:aa685261ceb2557990dcfe9dd8824c6b9ec416e2
|
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
|
services:
|
|
# Enable acpi to shutdown on power events
|
|
- name: acpid
|
|
image: linuxkit/acpid:6e3f0c5deca1633230dce9a35b67e1f61f05c47a
|
|
# Enable getty for easier debugging
|
|
- name: getty
|
|
image: linuxkit/getty:7abaf7b276c59f80891d92e9279e3e3ee8e2f512
|
|
env:
|
|
- INSECURE=true
|
|
# Run ntpd to keep time synchronised in the VM
|
|
- name: ntpd
|
|
image: linuxkit/openntpd:8d32daf90ecf70b7e185cb7a2db53b4c539d371c
|
|
# VSOCK to unix domain socket forwarding. Forwards guest /var/run/docker.sock
|
|
# to a socket on the host.
|
|
- name: vsudd
|
|
image: linuxkit/vsudd:a0336f99442a81e5f9bb117353c0c74455f5556b
|
|
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:42e88e9338c3b93eda79f6582f58d87fd78d0001
|
|
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:b20b16638f6712ce83699ae4aea5a6e8d3658db3
|
|
# When the host resumes from sleep, force a clock resync
|
|
- name: host-timesync-daemon
|
|
image: linuxkit/host-timesync-daemon:5d706ccc6d0d3e5b4b5d798deafde2e76acfe01d
|
|
|
|
trust:
|
|
org:
|
|
- linuxkit
|