diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-16 08:53:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 08:53:27 -0500 |
commit | 6639b218a28301e6e8d075cceb18c56ea62fcade (patch) | |
tree | b629cf4e17fae64a112f29710999955590d6509c /libpod/runtime_img.go | |
parent | 0a6b76eba173dbc4b4b4ad468e15b9d9cb192292 (diff) | |
parent | 2845f7b832ebf14d4c2f1bb8c147df5f60db4115 (diff) | |
download | podman-6639b218a28301e6e8d075cceb18c56ea62fcade.tar.gz podman-6639b218a28301e6e8d075cceb18c56ea62fcade.tar.bz2 podman-6639b218a28301e6e8d075cceb18c56ea62fcade.zip |
Merge pull request #9368 from vrothberg/fix-9365
podman build: pass runtime to buildah
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) |