From 45981ba29ae75ec328bfd14018ec4ada52e7f189 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 8 Feb 2021 14:26:51 -0500 Subject: Bump containers/buildah to v1.19.4 Fix handling of --iidfile to happen on the client side. Signed-off-by: Daniel J Walsh --- cmd/podman/images/build.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'cmd/podman/images') diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 308944ce5..895bdb631 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -264,7 +264,18 @@ func build(cmd *cobra.Command, args []string) error { return err } - _, err = registry.ImageEngine().Build(registry.GetContext(), containerFiles, *apiBuildOpts) + report, err := registry.ImageEngine().Build(registry.GetContext(), containerFiles, *apiBuildOpts) + + if cmd.Flag("iidfile").Changed { + f, err := os.Create(buildOpts.Iidfile) + if err != nil { + return err + } + if _, err := f.WriteString("sha256:" + report.ID); err != nil { + return err + } + } + return err } @@ -468,7 +479,6 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil ForceRmIntermediateCtrs: flags.ForceRm, From: flags.From, IDMappingOptions: idmappingOptions, - IIDFile: flags.Iidfile, In: stdin, Isolation: isolation, Jobs: &flags.Jobs, -- cgit v1.2.3-54-g00ecf