Skip to content

Commit

Permalink
Use a lighter PID 1 than $SHELL
Browse files Browse the repository at this point in the history
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.

containers/podman#1452
  • Loading branch information
debarshiray committed Sep 13, 2018
1 parent d7219ba commit fd69727
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fedora-toolbox
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd69727

Please sign in to comment.