Use a lighter PID 1 than $SHELL

When used as PID 1, /bin/sh takes 3248 kB compared to the 4136 kB
taken by /bin/bash. It's not a lot, but is memory that can be saved
for free.

As a nice side-effect, this unbreaks 'create' with podman-0.9.1 because
'podman create ...' doesn't work without a command.

https://github.com/containers/libpod/issues/1452
This commit is contained in:
Debarshi Ray 2018-09-12 14:57:38 +02:00
parent d7219ba512
commit fd697274a3

View file

@ -97,7 +97,8 @@ create()
--tty \
--volume $HOME:$HOME \
--volume $XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR \
$toolbox_image >/dev/null 2>&42; then
$toolbox_image \
/bin/sh >/dev/null 2>&42; then
echo "$0: failed to create container $toolbox_container"
exit 1
fi