mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 18:11:35 +00:00
Support dhcpcd in one shot mode as well
This is needed for cloud environments that want to get their metadata in the onboot phase over the network. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
06ac17821b
commit
2c7628c101
@ -15,6 +15,17 @@ onboot:
|
|||||||
capabilities:
|
capabilities:
|
||||||
- CAP_SYS_ADMIN
|
- CAP_SYS_ADMIN
|
||||||
readonly: true
|
readonly: true
|
||||||
|
- name: dhcpcd
|
||||||
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
|
binds:
|
||||||
|
- /var:/var
|
||||||
|
- /tmp:/etc
|
||||||
|
capabilities:
|
||||||
|
- CAP_NET_ADMIN
|
||||||
|
- CAP_NET_BIND_SERVICE
|
||||||
|
- CAP_NET_RAW
|
||||||
|
net: host
|
||||||
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||||
- name: metadata-gcp
|
- name: metadata-gcp
|
||||||
image: "mobylinux/metadata-gcp:7fc3dd5ef92e0408fb3f76048bbaae88bbb55ad9"
|
image: "mobylinux/metadata-gcp:7fc3dd5ef92e0408fb3f76048bbaae88bbb55ad9"
|
||||||
binds:
|
binds:
|
||||||
@ -32,17 +43,6 @@ services:
|
|||||||
- CAP_SYS_ADMIN
|
- CAP_SYS_ADMIN
|
||||||
oomScoreAdj: -800
|
oomScoreAdj: -800
|
||||||
readonly: true
|
readonly: true
|
||||||
- name: dhcpcd
|
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
|
||||||
binds:
|
|
||||||
- /var:/var
|
|
||||||
- /tmp:/etc
|
|
||||||
capabilities:
|
|
||||||
- CAP_NET_ADMIN
|
|
||||||
- CAP_NET_BIND_SERVICE
|
|
||||||
- CAP_NET_RAW
|
|
||||||
net: host
|
|
||||||
oomScoreAdj: -800
|
|
||||||
- name: sshd
|
- name: sshd
|
||||||
image: "mobylinux/sshd:160631d59fffc13d523ff7f09b3b49538d34b9cd"
|
image: "mobylinux/sshd:160631d59fffc13d523ff7f09b3b49538d34b9cd"
|
||||||
capabilities:
|
capabilities:
|
||||||
|
@ -21,7 +21,7 @@ services:
|
|||||||
- CAP_SYS_ADMIN
|
- CAP_SYS_ADMIN
|
||||||
oomScoreAdj: -800
|
oomScoreAdj: -800
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp:/etc
|
- /tmp:/etc
|
||||||
|
@ -23,7 +23,7 @@ services:
|
|||||||
oomScoreAdj: -800
|
oomScoreAdj: -800
|
||||||
readonly: true
|
readonly: true
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp:/etc
|
- /tmp:/etc
|
||||||
|
16
moby.yml
16
moby.yml
@ -20,15 +20,8 @@ onboot:
|
|||||||
binds:
|
binds:
|
||||||
- /proc/sys/fs/binfmt_misc:/binfmt_misc
|
- /proc/sys/fs/binfmt_misc:/binfmt_misc
|
||||||
readonly: true
|
readonly: true
|
||||||
services:
|
|
||||||
- name: rngd
|
|
||||||
image: "mobylinux/rngd:3dad6dd43270fa632ac031e99d1947f20b22eec9@sha256:1c93c1db7196f6f71f8e300bc1d15f0376dd18e8891c8789d77c8ff19f3a9a92"
|
|
||||||
capabilities:
|
|
||||||
- CAP_SYS_ADMIN
|
|
||||||
oomScoreAdj: -800
|
|
||||||
readonly: true
|
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp/etc:/etc
|
- /tmp/etc:/etc
|
||||||
@ -37,7 +30,14 @@ services:
|
|||||||
- CAP_NET_BIND_SERVICE
|
- CAP_NET_BIND_SERVICE
|
||||||
- CAP_NET_RAW
|
- CAP_NET_RAW
|
||||||
net: host
|
net: host
|
||||||
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||||
|
services:
|
||||||
|
- name: rngd
|
||||||
|
image: "mobylinux/rngd:3dad6dd43270fa632ac031e99d1947f20b22eec9@sha256:1c93c1db7196f6f71f8e300bc1d15f0376dd18e8891c8789d77c8ff19f3a9a92"
|
||||||
|
capabilities:
|
||||||
|
- CAP_SYS_ADMIN
|
||||||
oomScoreAdj: -800
|
oomScoreAdj: -800
|
||||||
|
readonly: true
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: "nginx:alpine"
|
image: "nginx:alpine"
|
||||||
capabilities:
|
capabilities:
|
||||||
|
@ -41,3 +41,6 @@ nodelay
|
|||||||
|
|
||||||
# Do not arp to check IP
|
# Do not arp to check IP
|
||||||
noarp
|
noarp
|
||||||
|
|
||||||
|
# wait for ipv4 address
|
||||||
|
waitip 4
|
||||||
|
@ -39,7 +39,7 @@ services:
|
|||||||
oomScoreAdj: -800
|
oomScoreAdj: -800
|
||||||
readonly: true
|
readonly: true
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp/etc:/etc
|
- /tmp/etc:/etc
|
||||||
|
@ -16,7 +16,7 @@ onboot:
|
|||||||
readonly: true
|
readonly: true
|
||||||
services:
|
services:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp/etc:/etc
|
- /tmp/etc:/etc
|
||||||
|
@ -20,7 +20,7 @@ services:
|
|||||||
oomScoreAdj: -800
|
oomScoreAdj: -800
|
||||||
readonly: true
|
readonly: true
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp/etc:/etc
|
- /tmp/etc:/etc
|
||||||
|
@ -81,4 +81,4 @@ trust:
|
|||||||
image:
|
image:
|
||||||
- mobylinux/kernel
|
- mobylinux/kernel
|
||||||
outputs:
|
outputs:
|
||||||
- format: kernel+initrd
|
- format: kernel+initrd
|
||||||
|
@ -15,7 +15,7 @@ onboot:
|
|||||||
- CAP_SYS_ADMIN
|
- CAP_SYS_ADMIN
|
||||||
services:
|
services:
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp:/etc
|
- /tmp:/etc
|
||||||
|
@ -7,15 +7,8 @@ init:
|
|||||||
- mobylinux/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
|
- mobylinux/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
|
||||||
- mobylinux/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
- mobylinux/ca-certificates:eabc5a6e59f05aa91529d80e9a595b85b046f935
|
||||||
onboot:
|
onboot:
|
||||||
- name: check
|
|
||||||
image: "mobylinux/check:c9e41ab96b3ea6a3ced97634751e20d12a5bf52f"
|
|
||||||
pid: host
|
|
||||||
capabilities:
|
|
||||||
- CAP_SYS_BOOT
|
|
||||||
readonly: true
|
|
||||||
services:
|
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp:/etc
|
- /tmp:/etc
|
||||||
@ -24,7 +17,13 @@ services:
|
|||||||
- CAP_NET_BIND_SERVICE
|
- CAP_NET_BIND_SERVICE
|
||||||
- CAP_NET_RAW
|
- CAP_NET_RAW
|
||||||
net: host
|
net: host
|
||||||
oomScoreAdj: -800
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
||||||
|
- name: check
|
||||||
|
image: "mobylinux/check:c9e41ab96b3ea6a3ced97634751e20d12a5bf52f"
|
||||||
|
pid: host
|
||||||
|
capabilities:
|
||||||
|
- CAP_SYS_BOOT
|
||||||
|
readonly: true
|
||||||
outputs:
|
outputs:
|
||||||
- format: kernel+initrd
|
- format: kernel+initrd
|
||||||
- format: iso-bios
|
- format: iso-bios
|
||||||
|
@ -27,7 +27,7 @@ services:
|
|||||||
oomScoreAdj: -800
|
oomScoreAdj: -800
|
||||||
readonly: true
|
readonly: true
|
||||||
- name: dhcpcd
|
- name: dhcpcd
|
||||||
image: "mobylinux/dhcpcd:3eb32da7ff8051f61e0f18edd90dd0fbfcf148ea"
|
image: "mobylinux/dhcpcd:0d4012269cb142972fed8542fbdc3ff5a7b695cd"
|
||||||
binds:
|
binds:
|
||||||
- /var:/var
|
- /var:/var
|
||||||
- /tmp:/etc
|
- /tmp:/etc
|
||||||
|
Loading…
Reference in New Issue
Block a user