mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Use exec in a couple of places to avoid needless lingering /bin/sh processes
``` $ apk -U add procps $ ps xf 1 ? Ss 0:05 /sbin/init 357 ? Ss 0:00 /bin/sh /etc/init.d/containerd 359 ? Sl 0:00 \_ /usr/bin/containerd 360 ? Ss 0:00 /bin/sh /etc/init.d/containers 432 ? Sl 0:00 \_ /usr/bin/runc run --bundle /containers/daemon/swa 466 ? Ssl 0:00 | \_ /usr/bin/swarmd --containerd-addr=/run/contai 427 ? Sl 0:00 \_ /usr/bin/runc run --bundle /containers/daemon/dhc 457 ? Ss 0:00 | \_ bin/sh /usr/local/bin/start_dhcpcd.sh 474 ? S 0:00 | \_ /sbin/dhcpcd --nobackground 429 ? Sl 0:00 \_ /usr/bin/runc run --bundle /containers/daemon/rng 576 ? Ss 0:00 \_ /bin/tini /usr/sbin/rngd -f 580 ? S 0:00 \_ /usr/sbin/rngd -f ``` becomes ``` $ ps xf 1 ? Ss 0:06 /sbin/init 358 ? Ss 0:00 /bin/sh /etc/init.d/containers 426 ? Sl 0:00 \_ /usr/bin/runc run --bundle /containers/daemon/dhc 458 ? Ss 0:00 | \_ /sbin/dhcpcd --nobackground 431 ? Sl 0:00 \_ /usr/bin/runc run --bundle /containers/daemon/swa 460 ? Ssl 0:00 | \_ /usr/bin/swarmd --containerd-addr=/run/contai 428 ? Sl 0:00 \_ /usr/bin/runc run --bundle /containers/daemon/rng 574 ? Ss 0:00 \_ /bin/tini /usr/sbin/rngd -f 578 ? S 0:00 \_ /usr/sbin/rngd -f 356 ? Ssl 0:00 /usr/bin/containerd ``` Specifically these are gone: 357 ? Ss 0:00 /bin/sh /etc/init.d/containerd 457 ? Ss 0:00 | \_ bin/sh /usr/local/bin/start_dhcpcd.sh Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
ea75bd96b6
commit
8270bdfe33
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
@ -34,7 +34,7 @@ daemon:
|
||||
oomScoreAdj: -800
|
||||
readonly: true
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp:/etc
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
@ -21,7 +21,7 @@ daemon:
|
||||
- CAP_SYS_ADMIN
|
||||
oomScoreAdj: -800
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp:/etc
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=tty0 page_poison=1"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
@ -24,7 +24,7 @@ daemon:
|
||||
oomScoreAdj: -800
|
||||
readonly: true
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp:/etc
|
||||
|
4
moby.yml
4
moby.yml
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
@ -24,7 +24,7 @@ daemon:
|
||||
oomScoreAdj: -800
|
||||
readonly: true
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp/etc:/etc
|
||||
|
@ -6,4 +6,4 @@ ip link set eth0 up
|
||||
|
||||
cp /dhcpcd.conf /etc/dhcpcd.conf
|
||||
|
||||
/sbin/dhcpcd --nobackground
|
||||
exec /sbin/dhcpcd --nobackground
|
||||
|
@ -6,4 +6,4 @@ ulimit -p unlimited
|
||||
|
||||
printf "\nStarting containerd\n"
|
||||
mkdir -p /var/log
|
||||
/sbin/start-stop-daemon --start --exec /usr/bin/containerd
|
||||
exec /sbin/start-stop-daemon --start --exec /usr/bin/containerd
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
@ -24,7 +24,7 @@ daemon:
|
||||
oomScoreAdj: -800
|
||||
readonly: true
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp/etc:/etc
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: ltp
|
||||
image: "mobylinux/test-ltp-20170116:fdca2d1bb019b1d51e722e6032c82c7933d4b870"
|
||||
@ -11,7 +11,7 @@ system:
|
||||
- CAP_SYS_ADMIN
|
||||
daemon:
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp:/etc
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: binfmt
|
||||
image: "mobylinux/binfmt:bdb754f25a5d851b4f5f8d185a43dfcbb3c22d01"
|
||||
@ -16,7 +16,7 @@ system:
|
||||
readonly: true
|
||||
daemon:
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp:/etc
|
||||
|
@ -5,7 +5,7 @@ kernel:
|
||||
# image: "mobylinux/kernel:4.9.14-0"
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init: "mobylinux/init:a27e32a8d6c8865d691fbfb4d0bbb93846cf7802"
|
||||
init: "mobylinux/init:bdc1897c40048c9ab490681be2b89ccf5740ff77"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
@ -23,7 +23,7 @@ daemon:
|
||||
oomScoreAdj: -800
|
||||
readonly: true
|
||||
- name: dhcpcd
|
||||
image: "mobylinux/dhcpcd:d01a17d211218f289e2bac601bfe9787d4fabaf2"
|
||||
image: "mobylinux/dhcpcd:57a8ef29d3a910645b2b24c124f9ce9ef53ce703"
|
||||
binds:
|
||||
- /var:/var
|
||||
- /tmp:/etc
|
||||
|
Loading…
Reference in New Issue
Block a user