diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-08-26 10:27:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 10:27:27 -0400 |
commit | 0c028cd9d1414a1c84bafa42b5dd95639003d44d (patch) | |
tree | 3daf03125e1494bae8907f20de904746be063613 /pkg/bindings/images | |
parent | 03e51a058d35820fe8a9a9050b438f9db021ce11 (diff) | |
parent | e00272cd99ec7ccfc73ccf1e67e123e98f2ab3f0 (diff) | |
download | podman-0c028cd9d1414a1c84bafa42b5dd95639003d44d.tar.gz podman-0c028cd9d1414a1c84bafa42b5dd95639003d44d.tar.bz2 podman-0c028cd9d1414a1c84bafa42b5dd95639003d44d.zip |
Merge pull request #15477 from flouthoc/remote-build-idmappings
remote,API: fix implementation of build with `--userns=auto` for API and remote use-cases.
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r-- | pkg/bindings/images/build.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go index 2615bc516..8348ac54b 100644 --- a/pkg/bindings/images/build.go +++ b/pkg/bindings/images/build.go @@ -88,6 +88,13 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO } params.Set("additionalbuildcontexts", string(additionalBuildContextMap)) } + if options.IDMappingOptions != nil { + idmappingsOptions, err := jsoniter.Marshal(options.IDMappingOptions) + if err != nil { + return nil, err + } + params.Set("idmappingoptions", string(idmappingsOptions)) + } if buildArgs := options.Args; len(buildArgs) > 0 { bArgs, err := jsoniter.MarshalToString(buildArgs) if err != nil { |