Skip to content

Instantly share code, notes, and snippets.

@infoslack
Created April 22, 2017 18:45
Show Gist options
  • Save infoslack/bf1e1c406fe604dd707dc7fd27c9725b to your computer and use it in GitHub Desktop.
Save infoslack/bf1e1c406fe604dd707dc7fd27c9725b to your computer and use it in GitHub Desktop.
LinuxKit Example
kernel:
image: "linuxkit/kernel:4.9.x"
cmdline: "console=ttyS0 page_poison=1"
init:
- linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
- linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
- linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
- linuxkit/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
onboot:
- name: sysctl
image: "linuxkit/sysctl:1f5ec5d5e6f7a7a1b3d2ff9dd9e36fd6fb14756a"
net: host
pid: host
ipc: host
capabilities:
- CAP_SYS_ADMIN
readonly: true
- name: dhcpcd
image: "linuxkit/dhcpcd:48e249ebef6a521eed886b3bce032db69fbb4afa"
binds:
- /var:/var
- /tmp/etc:/etc
capabilities:
- CAP_NET_ADMIN
- CAP_NET_BIND_SERVICE
- CAP_NET_RAW
net: host
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: "linuxkit/metadata:c5567e65e9125f0a4c4b8cb9d56a86377be62652"
binds:
- /dev:/dev
- /var:/var
- /tmp/etc/resolv.conf:/etc/resolv.conf
net: host
capabilities:
- CAP_SYS_ADMIN
services:
- name: rngd
image: "linuxkit/rngd:3dad6dd43270fa632ac031e99d1947f20b22eec9"
capabilities:
- CAP_SYS_ADMIN
oomScoreAdj: -800
readonly: true
- name: sshd
image: "linuxkit/sshd:e108d208adf692c8a0954f602743e0eec445364e"
capabilities:
- all
net: host
pid: host
binds:
- /var/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- /tmp/etc/resolv.conf:/etc/resolv.conf
- name: nginx
image: "nginx:alpine"
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETUID
- CAP_SETGID
- CAP_DAC_OVERRIDE
net: host
trust:
image:
- linuxkit/kernel
outputs:
- format: kernel+initrd
- format: gcp
project: moby
bucket: mobytestjustin
family: moby-dev
replace: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment