How should one invoke docker to take care of the PID 1 problem with zombie processes?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
The phusion/baseimage
boasts of taking care of the pid 1 problem with a light weight init process. How can one use the phusion/baseimage properly? I tried to invoke the image with the command ps aux
shows ps
running with a PID 1.
What did I do wrong? What is the proper way to use the image?
me@host:~/app1$ docker run --rm phusion/baseimage ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 3.0 0.0 29180 1404 ? Rs 01:27 0:00 ps aux
docker init zombie-process
add a comment |Â
up vote
1
down vote
favorite
The phusion/baseimage
boasts of taking care of the pid 1 problem with a light weight init process. How can one use the phusion/baseimage properly? I tried to invoke the image with the command ps aux
shows ps
running with a PID 1.
What did I do wrong? What is the proper way to use the image?
me@host:~/app1$ docker run --rm phusion/baseimage ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 3.0 0.0 29180 1404 ? Rs 01:27 0:00 ps aux
docker init zombie-process
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
The phusion/baseimage
boasts of taking care of the pid 1 problem with a light weight init process. How can one use the phusion/baseimage properly? I tried to invoke the image with the command ps aux
shows ps
running with a PID 1.
What did I do wrong? What is the proper way to use the image?
me@host:~/app1$ docker run --rm phusion/baseimage ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 3.0 0.0 29180 1404 ? Rs 01:27 0:00 ps aux
docker init zombie-process
The phusion/baseimage
boasts of taking care of the pid 1 problem with a light weight init process. How can one use the phusion/baseimage properly? I tried to invoke the image with the command ps aux
shows ps
running with a PID 1.
What did I do wrong? What is the proper way to use the image?
me@host:~/app1$ docker run --rm phusion/baseimage ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 3.0 0.0 29180 1404 ? Rs 01:27 0:00 ps aux
docker init zombie-process
asked May 8 at 2:04
Lord Loh.
71641128
71641128
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
docker has an option --init
. That starts init system tini as Pid 1.
tini
is stored as /usr/bin/docker-init
on host.
Unfortunately, some systems like fedora and openSUSE miss the init binary although --init
shows up in docker run --help
.
You can add tini
to your docker images yourself and define entrypoint withENTRYPOINT /tini --
. See README for tini.
Further informations about missing /usr/bin/docker-init
at: https://github.com/mviereck/x11docker/issues/23#issuecomment-386817295
add a comment |Â
up vote
0
down vote
I figured out (from here) that the proper way to use the phusion/baseimage
is to run it as -
docker run --rm -t -i phusion/baseimage /sbin/my_init ps aux`
to have my_init
execute as PID1 and have my_init
spawn a process for ps aux
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: syslog-ng starting up; version='3.5.6'
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: WARNING: you are using the pipe driver, underlying file is not a FIFO, it should be used by file(); filename='/dev/stdout'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 16
*** Running ps aux...
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (pidfile fd = 3)
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (Running @reboot jobs)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 5.0 0.0 32304 10796 ? Ss+ 04:18 0:00 /usr/bin/python3 -u /sbin/my_init ps aux
root 10 1.0 0.0 72364 7552 ? S 04:18 0:00 /usr/sbin/syslog-ng --pidfile /var/run/syslog-ng.pid -F --no-caps
root 16 0.0 0.0 4392 1124 ? S+ 04:18 0:00 /usr/bin/runsvdir -P /etc/service
root 17 0.0 0.0 37656 3340 ? R+ 04:18 0:00 ps aux
root 18 0.0 0.0 4240 672 ? Ss 04:18 0:00 runsv cron
root 19 0.0 0.0 4240 800 ? Ss 04:18 0:00 runsv sshd
root 20 0.0 0.0 29272 2840 ? S 04:18 0:00 /usr/sbin/cron -f
*** ps exited with status 0.
*** Shutting down runit daemon (PID 16)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: syslog-ng shutting down; version='3.5.6'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Killing all processes...
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
docker has an option --init
. That starts init system tini as Pid 1.
tini
is stored as /usr/bin/docker-init
on host.
Unfortunately, some systems like fedora and openSUSE miss the init binary although --init
shows up in docker run --help
.
You can add tini
to your docker images yourself and define entrypoint withENTRYPOINT /tini --
. See README for tini.
Further informations about missing /usr/bin/docker-init
at: https://github.com/mviereck/x11docker/issues/23#issuecomment-386817295
add a comment |Â
up vote
1
down vote
docker has an option --init
. That starts init system tini as Pid 1.
tini
is stored as /usr/bin/docker-init
on host.
Unfortunately, some systems like fedora and openSUSE miss the init binary although --init
shows up in docker run --help
.
You can add tini
to your docker images yourself and define entrypoint withENTRYPOINT /tini --
. See README for tini.
Further informations about missing /usr/bin/docker-init
at: https://github.com/mviereck/x11docker/issues/23#issuecomment-386817295
add a comment |Â
up vote
1
down vote
up vote
1
down vote
docker has an option --init
. That starts init system tini as Pid 1.
tini
is stored as /usr/bin/docker-init
on host.
Unfortunately, some systems like fedora and openSUSE miss the init binary although --init
shows up in docker run --help
.
You can add tini
to your docker images yourself and define entrypoint withENTRYPOINT /tini --
. See README for tini.
Further informations about missing /usr/bin/docker-init
at: https://github.com/mviereck/x11docker/issues/23#issuecomment-386817295
docker has an option --init
. That starts init system tini as Pid 1.
tini
is stored as /usr/bin/docker-init
on host.
Unfortunately, some systems like fedora and openSUSE miss the init binary although --init
shows up in docker run --help
.
You can add tini
to your docker images yourself and define entrypoint withENTRYPOINT /tini --
. See README for tini.
Further informations about missing /usr/bin/docker-init
at: https://github.com/mviereck/x11docker/issues/23#issuecomment-386817295
answered Jun 3 at 12:28
mviereck
1,0871310
1,0871310
add a comment |Â
add a comment |Â
up vote
0
down vote
I figured out (from here) that the proper way to use the phusion/baseimage
is to run it as -
docker run --rm -t -i phusion/baseimage /sbin/my_init ps aux`
to have my_init
execute as PID1 and have my_init
spawn a process for ps aux
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: syslog-ng starting up; version='3.5.6'
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: WARNING: you are using the pipe driver, underlying file is not a FIFO, it should be used by file(); filename='/dev/stdout'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 16
*** Running ps aux...
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (pidfile fd = 3)
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (Running @reboot jobs)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 5.0 0.0 32304 10796 ? Ss+ 04:18 0:00 /usr/bin/python3 -u /sbin/my_init ps aux
root 10 1.0 0.0 72364 7552 ? S 04:18 0:00 /usr/sbin/syslog-ng --pidfile /var/run/syslog-ng.pid -F --no-caps
root 16 0.0 0.0 4392 1124 ? S+ 04:18 0:00 /usr/bin/runsvdir -P /etc/service
root 17 0.0 0.0 37656 3340 ? R+ 04:18 0:00 ps aux
root 18 0.0 0.0 4240 672 ? Ss 04:18 0:00 runsv cron
root 19 0.0 0.0 4240 800 ? Ss 04:18 0:00 runsv sshd
root 20 0.0 0.0 29272 2840 ? S 04:18 0:00 /usr/sbin/cron -f
*** ps exited with status 0.
*** Shutting down runit daemon (PID 16)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: syslog-ng shutting down; version='3.5.6'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Killing all processes...
add a comment |Â
up vote
0
down vote
I figured out (from here) that the proper way to use the phusion/baseimage
is to run it as -
docker run --rm -t -i phusion/baseimage /sbin/my_init ps aux`
to have my_init
execute as PID1 and have my_init
spawn a process for ps aux
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: syslog-ng starting up; version='3.5.6'
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: WARNING: you are using the pipe driver, underlying file is not a FIFO, it should be used by file(); filename='/dev/stdout'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 16
*** Running ps aux...
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (pidfile fd = 3)
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (Running @reboot jobs)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 5.0 0.0 32304 10796 ? Ss+ 04:18 0:00 /usr/bin/python3 -u /sbin/my_init ps aux
root 10 1.0 0.0 72364 7552 ? S 04:18 0:00 /usr/sbin/syslog-ng --pidfile /var/run/syslog-ng.pid -F --no-caps
root 16 0.0 0.0 4392 1124 ? S+ 04:18 0:00 /usr/bin/runsvdir -P /etc/service
root 17 0.0 0.0 37656 3340 ? R+ 04:18 0:00 ps aux
root 18 0.0 0.0 4240 672 ? Ss 04:18 0:00 runsv cron
root 19 0.0 0.0 4240 800 ? Ss 04:18 0:00 runsv sshd
root 20 0.0 0.0 29272 2840 ? S 04:18 0:00 /usr/sbin/cron -f
*** ps exited with status 0.
*** Shutting down runit daemon (PID 16)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: syslog-ng shutting down; version='3.5.6'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Killing all processes...
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I figured out (from here) that the proper way to use the phusion/baseimage
is to run it as -
docker run --rm -t -i phusion/baseimage /sbin/my_init ps aux`
to have my_init
execute as PID1 and have my_init
spawn a process for ps aux
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: syslog-ng starting up; version='3.5.6'
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: WARNING: you are using the pipe driver, underlying file is not a FIFO, it should be used by file(); filename='/dev/stdout'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 16
*** Running ps aux...
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (pidfile fd = 3)
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (Running @reboot jobs)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 5.0 0.0 32304 10796 ? Ss+ 04:18 0:00 /usr/bin/python3 -u /sbin/my_init ps aux
root 10 1.0 0.0 72364 7552 ? S 04:18 0:00 /usr/sbin/syslog-ng --pidfile /var/run/syslog-ng.pid -F --no-caps
root 16 0.0 0.0 4392 1124 ? S+ 04:18 0:00 /usr/bin/runsvdir -P /etc/service
root 17 0.0 0.0 37656 3340 ? R+ 04:18 0:00 ps aux
root 18 0.0 0.0 4240 672 ? Ss 04:18 0:00 runsv cron
root 19 0.0 0.0 4240 800 ? Ss 04:18 0:00 runsv sshd
root 20 0.0 0.0 29272 2840 ? S 04:18 0:00 /usr/sbin/cron -f
*** ps exited with status 0.
*** Shutting down runit daemon (PID 16)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: syslog-ng shutting down; version='3.5.6'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Killing all processes...
I figured out (from here) that the proper way to use the phusion/baseimage
is to run it as -
docker run --rm -t -i phusion/baseimage /sbin/my_init ps aux`
to have my_init
execute as PID1 and have my_init
spawn a process for ps aux
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: syslog-ng starting up; version='3.5.6'
May 8 04:18:23 daf3cfab8573 syslog-ng[10]: WARNING: you are using the pipe driver, underlying file is not a FIFO, it should be used by file(); filename='/dev/stdout'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 16
*** Running ps aux...
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (pidfile fd = 3)
May 8 04:18:24 daf3cfab8573 cron[20]: (CRON) INFO (Running @reboot jobs)
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 5.0 0.0 32304 10796 ? Ss+ 04:18 0:00 /usr/bin/python3 -u /sbin/my_init ps aux
root 10 1.0 0.0 72364 7552 ? S 04:18 0:00 /usr/sbin/syslog-ng --pidfile /var/run/syslog-ng.pid -F --no-caps
root 16 0.0 0.0 4392 1124 ? S+ 04:18 0:00 /usr/bin/runsvdir -P /etc/service
root 17 0.0 0.0 37656 3340 ? R+ 04:18 0:00 ps aux
root 18 0.0 0.0 4240 672 ? Ss 04:18 0:00 runsv cron
root 19 0.0 0.0 4240 800 ? Ss 04:18 0:00 runsv sshd
root 20 0.0 0.0 29272 2840 ? S 04:18 0:00 /usr/sbin/cron -f
*** ps exited with status 0.
*** Shutting down runit daemon (PID 16)...
*** Running /etc/my_init.post_shutdown.d/10_syslog-ng.shutdown...
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: syslog-ng shutting down; version='3.5.6'
May 8 04:18:24 daf3cfab8573 syslog-ng[10]: EOF on control channel, closing connection;
*** Killing all processes...
answered May 8 at 4:25
Lord Loh.
71641128
71641128
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442441%2fhow-should-one-invoke-docker-to-take-care-of-the-pid-1-problem-with-zombie-proce%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password