|
| 1 | +kernel: |
| 2 | + image: linuxkit/kernel:4.14.27 |
| 3 | + cmdline: "console=tty0 console=ttyS0 console=ttyAMA0" |
| 4 | +init: |
| 5 | + - linuxkit/init:b212cfeb4bb6330e0a7547d8010fe2e8489b677a |
| 6 | + - linuxkit/runc:7c39a68490a12cde830e1922f171c451fb08e731 |
| 7 | + - linuxkit/containerd:37e397ebfc6bd5d8e18695b121166ffd0cbfd9f0 |
| 8 | + - linuxkit/ca-certificates:v0.2 |
| 9 | +onboot: |
| 10 | + - name: sysctl |
| 11 | + image: linuxkit/sysctl:v0.2 |
| 12 | + - name: netdev |
| 13 | + image: linuxkit/modprobe:v0.2 |
| 14 | + # smsc95xx - https://github.com/linuxkit/linuxkit/blob/master/docs/platform-rpi3.md#networking |
| 15 | + # mmc_block - Load MMC block device driver so the sdcard is visible in /dev/mmc* |
| 16 | + command: ["modprobe", "-a", "smsc95xx", "mmc_block" ] |
| 17 | + - name: extend |
| 18 | + # Note: temporarily use ernoaapa/extend to extend the last partition |
| 19 | + # See: https://github.com/linuxkit/linuxkit/issues/2971 |
| 20 | + image: ernoaapa/extend:187548787419ea12ce02025cc50cf6ff5d6bfc7a |
| 21 | + command: ["/usr/bin/extend", "/dev/mmcblk0"] |
| 22 | + - name: format |
| 23 | + image: linuxkit/format:v0.2 |
| 24 | + command: ["/usr/bin/format", "-force", "-type", "ext4", "-label", "DATA", "-verbose", "/dev/sda"] |
| 25 | + - name: mount-disk |
| 26 | + image: linuxkit/mount:v0.2 |
| 27 | + # command: ["/usr/bin/mountie", "/dev/mmcblk0p2", "/var"] |
| 28 | + command: ["/usr/bin/mountie", "-device", "/dev/sda1", "/var/foo"] |
| 29 | + binds: |
| 30 | + - /dev:/dev |
| 31 | + - /var:/var:rshared,rbind |
| 32 | + - /:/hostroot |
| 33 | + - /etc/fstab:/etc/fstab |
| 34 | + - /mnt:/mnt |
| 35 | + # - name: mount-fstab |
| 36 | + # image: linuxkit/mount:v0.2 |
| 37 | + # binds: |
| 38 | + # - "/etc/fstab:/etc/fstab" |
| 39 | + # command: ["/bin/mount", "-a", "-v"] |
| 40 | + # - name: mount-tmp |
| 41 | + # image: linuxkit/mount:v0.2 |
| 42 | + # command: ["/bin/sh", "-c", "mkdir -p /mnt/tmp && mount --bind /mnt/tmp /tmp"] |
| 43 | + # - name: mount-containers |
| 44 | + # image: linuxkit/mount:v0.2 |
| 45 | + # command: ["/bin/sh", "-c", "mkdir -p /mnt/containers && mount --bind /mnt/containers /containers"] |
| 46 | + # - name: mount-var |
| 47 | + # image: linuxkit/mount:v0.2 |
| 48 | + # command: ["/bin/sh", "-c", "mkdir -p /mnt/var && mount --bind /mnt/var /var"] |
| 49 | + - name: dhcpcd |
| 50 | + image: linuxkit/dhcpcd:v0.2 |
| 51 | + # Halts until dhcpcd can resolve ip address |
| 52 | + command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"] |
| 53 | + |
| 54 | +services: |
| 55 | + - name: getty |
| 56 | + image: linuxkit/getty:v0.2 |
| 57 | + env: |
| 58 | + # Makes the terminal open without password prompt |
| 59 | + - INSECURE=true |
| 60 | + binds: |
| 61 | + - "/etc/resolv.conf:/etc/resolv.conf" |
| 62 | + - "/run:/run" |
| 63 | + - "/tmp:/tmp" |
| 64 | + - "/etc:/hostroot/etc" |
| 65 | + - "/usr/bin/ctr:/usr/bin/ctr" |
| 66 | + - "/usr/bin/runc:/usr/bin/runc" |
| 67 | + - "/containers:/containers" |
| 68 | + - "/var/log:/var/log" |
| 69 | + - "/dev:/dev" |
| 70 | + - "/sys:/sys" |
| 71 | + - "/proc:/hostroot/proc" |
| 72 | + - "/var:/var" |
| 73 | + - "/var/foo:/var/foo" |
| 74 | + - name: ntpd |
| 75 | + image: linuxkit/openntpd:v0.2 |
| 76 | + - name: dhcpcd |
| 77 | + image: linuxkit/dhcpcd:v0.2 |
| 78 | + |
| 79 | + - name: eliotd |
| 80 | + image: ernoaapa/eliotd:v0.2.8 |
| 81 | + command: ["/eliotd", "--debug", "--profile", "--grpc-api-listen", "0.0.0.0:5000"] |
| 82 | + capabilities: |
| 83 | + - all |
| 84 | + net: host |
| 85 | + pid: host |
| 86 | + runtime: |
| 87 | + mkdir: ["/var/lib/volumes"] |
| 88 | + binds: |
| 89 | + - /containers:/containers |
| 90 | + - /var/lib/volumes:/var/lib/volumes |
| 91 | + - /var/lib/containerd:/var/lib/containerd |
| 92 | + - /run/containerd:/run/containerd |
| 93 | + - /etc/resolv.conf:/etc/resolv.conf |
| 94 | + - /etc/machine-id:/etc/machine-id |
| 95 | + - /var/log:/var/log # To be able to serve default containers logs through api |
| 96 | + - /tmp:/tmp # To be able to read temporary fifo log files |
| 97 | + - /run:/run |
| 98 | + - /dev:/dev |
| 99 | + - /sys:/sys |
| 100 | + |
| 101 | +files: |
| 102 | + - path: /etc/issue |
| 103 | + contents: "welcome to EliotOS" |
| 104 | + - path: /etc/machine-id |
| 105 | + contents: "todo-generate" |
| 106 | + mode: "0600" |
| 107 | + # - path: /etc/fstab |
| 108 | + # contents: | |
| 109 | + # /mnt/containers /containers bind bind |
| 110 | + # /mnt/var/lib /var/lib bind bind |
| 111 | + # /mnt/var/log /var/log bind bind |
| 112 | + # /mnt/tmp /tmp bind bind |
| 113 | +trust: |
| 114 | + org: |
| 115 | + - linuxkit |
| 116 | +# image: |
| 117 | +# partitions: |
| 118 | +# - { start: 1048576, size: 104857600, boot: true, type: "fat32" } # 100MB partition for boot |
| 119 | +# - { start: 105906688, size: 52428800, type: "ext4" } # 50MB partition (get extended on boot) for persisted |
0 commit comments