Eu descobri ( aqui ) que a maneira correta de usar o phusion/baseimage
é executá-lo como -
docker run --rm -t -i phusion/baseimage /sbin/my_init ps aux'
para ter my_init
como PID1 e ter my_init
gerando um processo para 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...