diff options
author | Aditya R <arajan@redhat.com> | 2022-05-25 01:54:25 +0530 |
---|---|---|
committer | Aditya R <arajan@redhat.com> | 2022-05-26 21:01:31 +0530 |
commit | 66a56ce05a577913a66c3d3f98c47cbe6cb4a3c0 (patch) | |
tree | 6f0be19d2b25a00bde9b4693693614291b5f254f /cmd | |
parent | 6124b51993b0a8010b7b276086cf4464e168932a (diff) | |
download | podman-66a56ce05a577913a66c3d3f98c47cbe6cb4a3c0.tar.gz podman-66a56ce05a577913a66c3d3f98c47cbe6cb4a3c0.tar.bz2 podman-66a56ce05a577913a66c3d3f98c47cbe6cb4a3c0.zip |
vendor: bump buildah to v1.26.1-0.20220524184833-5500333c2e06
Bump buildah to v1.26.1-0.20220524184833-5500333c2e06
Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/images/build.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 3e7f35e28..940ea6e42 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -502,9 +502,26 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil return nil, errors.Wrapf(err, "unable to obtain decrypt config") } + additionalBuildContext := make(map[string]*buildahDefine.AdditionalBuildContext) + if c.Flag("build-context").Changed { + for _, contextString := range flags.BuildContext { + av := strings.SplitN(contextString, "=", 2) + if len(av) > 1 { + parseAdditionalBuildContext, err := parse.GetAdditionalBuildContext(av[1]) + if err != nil { + return nil, errors.Wrapf(err, "while parsing additional build context") + } + additionalBuildContext[av[0]] = &parseAdditionalBuildContext + } else { + return nil, fmt.Errorf("while parsing additional build context: %q, accepts value in the form of key=value", av) + } + } + } + opts := buildahDefine.BuildOptions{ AddCapabilities: flags.CapAdd, AdditionalTags: tags, + AdditionalBuildContexts: additionalBuildContext, AllPlatforms: flags.AllPlatforms, Annotations: flags.Annotation, Args: args, @@ -514,6 +531,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil Compression: compression, ConfigureNetwork: networkPolicy, ContextDirectory: contextDir, + CPPFlags: flags.CPPFlags, DefaultMountsFilePath: containerConfig.Containers.DefaultMountsFile, Devices: flags.Devices, DropCapabilities: flags.CapDrop, |