mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
Merge pull request #9368 from vrothberg/fix-9365
podman build: pass runtime to buildah
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user