diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-02-15 11:35:34 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-02-16 13:01:56 +0100 |
commit | 2845f7b832ebf14d4c2f1bb8c147df5f60db4115 (patch) | |
tree | 3754344fc1daac771821487673f2299ed087e34a /libpod/runtime_img.go | |
parent | ac9a048b59ebcbdfd2cb7abb50a97981892bd6b6 (diff) | |
download | podman-2845f7b832ebf14d4c2f1bb8c147df5f60db4115.tar.gz podman-2845f7b832ebf14d4c2f1bb8c147df5f60db4115.tar.bz2 podman-2845f7b832ebf14d4c2f1bb8c147df5f60db4115.zip |
podman build: pass runtime to buildah
Make sure that Podman's default OCI runtime is passed to Buildah in
`podman build`. In theory, Podman and Buildah should use the same
defaults but the projects move at different speeds and it turns out
we caused a regression in v3.0.
Fixes: #9365
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/runtime_img.go')
-rw-r--r-- | libpod/runtime_img.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go index f56fa8cce..fcc52b392 100644 --- a/libpod/runtime_img.go +++ b/libpod/runtime_img.go @@ -166,6 +166,11 @@ func (r *Runtime) newImageBuildCompleteEvent(idOrName string) { // Build adds the runtime to the imagebuildah call func (r *Runtime) Build(ctx context.Context, options imagebuildah.BuildOptions, dockerfiles ...string) (string, reference.Canonical, error) { + if options.Runtime == "" { + // Make sure that build containers use the same runtime as Podman (see #9365). + conf := util.DefaultContainerConfig() + options.Runtime = conf.Engine.OCIRuntime + } id, ref, err := imagebuildah.BuildDockerfiles(ctx, r.store, options, dockerfiles...) // Write event for build completion r.newImageBuildCompleteEvent(id) |