mirror of
https://github.com/containers/podman
synced 2024-10-20 17:23:30 +00:00
75578aad61
Add support for executing an init binary as PID 1 in a container to forward signals and reap processes. When the `--init` flag is set for podman-create or podman-run, the init binary is bind-mounted to `/dev/init` in the container and "/dev/init --" is prepended to the container's command. The default base path of the container-init binary is `/usr/libexec/podman` while the default binary is catatonit [1]. This default can be changed permanently via the `init_path` field in the `libpod.conf` configuration file (which is recommended for packaging) or temporarily via the `--init-path` flag of podman-create and podman-run. [1] https://github.com/openSUSE/catatonit Fixes: #1670 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
16 lines
504 B
Bash
Executable file
16 lines
504 B
Bash
Executable file
#!/bin/bash -e
|
|
BASE_PATH="/usr/libexec/podman"
|
|
CATATONIT_PATH="${BASE_PATH}/catatonit"
|
|
CATATONIT_VERSION="v0.1.3"
|
|
|
|
if [ -f $CATATONIT_PATH ]; then
|
|
echo "skipping ... catatonit is already installed"
|
|
else
|
|
echo "downloading catatonit to $CATATONIT_PATH"
|
|
curl -o catatonit -L https://github.com/openSUSE/catatonit/releases/download/$CATATONIT_VERSION/catatonit.x86_64
|
|
chmod +x catatonit
|
|
install ${SELINUXOPT} -d -m 755 $BASE_PATH
|
|
install ${SELINUXOPT} -m 755 catatonit $CATATONIT_PATH
|
|
rm catatonit
|
|
fi
|