diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-11-08 14:29:44 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-11-15 12:53:25 +0100 |
commit | 5934e4c9b50020e0099a71233ae4f9ba9356215f (patch) | |
tree | 5bb45e72e727080a10574b6be60b881fb3a34d6f /pkg/specgen | |
parent | 58cf0d4622ea280382dccdb527c483afd3f16562 (diff) | |
download | podman-5934e4c9b50020e0099a71233ae4f9ba9356215f.tar.gz podman-5934e4c9b50020e0099a71233ae4f9ba9356215f.tar.bz2 podman-5934e4c9b50020e0099a71233ae4f9ba9356215f.zip |
infra container: replace pause with catatonit
Podman has been using catatonit for a number of years already.
Thanks to @giuseppe, catatonit is now able to run as a pause
process which allows us to replace the pause binary entirely.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r-- | pkg/specgen/generate/pod_create.go | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go index bfd81739a..72dd249e7 100644 --- a/pkg/specgen/generate/pod_create.go +++ b/pkg/specgen/generate/pod_create.go @@ -29,19 +29,16 @@ func buildPauseImage(rt *libpod.Runtime, rtConfig *config.Config) (string, error return imageName, nil } - // NOTE: Having the pause binary in its own directory keeps the door - // open for replacing the image building with using an overlay root FS. - // The latter turned out to be complex and error prone (see #11956) but - // we may be able to come up with a proper solution at a later point in - // time. - pausePath, err := rtConfig.FindHelperBinary("pause/pause", false) + // Also look into the path as some distributions install catatonit in + // /usr/bin. + catatonitPath, err := rtConfig.FindHelperBinary("catatonit", true) if err != nil { return "", fmt.Errorf("finding pause binary: %w", err) } buildContent := fmt.Sprintf(`FROM scratch -COPY %s /pause -ENTRYPOINT ["/pause"]`, pausePath) +COPY %s /catatonit +ENTRYPOINT ["/catatonit", "-P"]`, catatonitPath) tmpF, err := ioutil.TempFile("", "pause.containerfile") if err != nil { |