diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-22 06:29:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 06:29:32 -0500 |
commit | 10d52c05e23e75b9c608e100999cb55334732525 (patch) | |
tree | 05d975ca6979e6aba836c1bdacfc74eeaaf24850 /pkg/bindings/images | |
parent | d92b94677cc816a1e157802836195430b731d015 (diff) | |
parent | 690c02f602eae68335192a202ba01c8097abf111 (diff) | |
download | podman-10d52c05e23e75b9c608e100999cb55334732525.tar.gz podman-10d52c05e23e75b9c608e100999cb55334732525.tar.bz2 podman-10d52c05e23e75b9c608e100999cb55334732525.zip |
Merge pull request #9275 from rhatdan/build
Add missing params for podman-remote build
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r-- | pkg/bindings/images/build.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go index 4bdb1a02c..6e16461e5 100644 --- a/pkg/bindings/images/build.go +++ b/pkg/bindings/images/build.go @@ -57,6 +57,13 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO } params.Set("buildargs", bArgs) } + if excludes := options.Excludes; len(excludes) > 0 { + bArgs, err := jsoniter.MarshalToString(excludes) + if err != nil { + return nil, err + } + params.Set("excludes", bArgs) + } if cpuShares := options.CommonBuildOpts.CPUShares; cpuShares > 0 { params.Set("cpushares", strconv.Itoa(int(cpuShares))) } @@ -94,7 +101,9 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO if len(options.From) > 0 { params.Set("from", options.From) } - + if options.IgnoreUnrecognizedInstructions { + params.Set("ignore", "1") + } params.Set("isolation", strconv.Itoa(int(options.Isolation))) if options.CommonBuildOpts.HTTPProxy { params.Set("httpproxy", "1") @@ -159,6 +168,13 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO } params.Set("extrahosts", h) } + if nsoptions := options.NamespaceOptions; len(nsoptions) > 0 { + ns, err := jsoniter.MarshalToString(nsoptions) + if err != nil { + return nil, err + } + params.Set("nsoptions", ns) + } if shmSize := options.CommonBuildOpts.ShmSize; len(shmSize) > 0 { shmBytes, err := units.RAMInBytes(shmSize) if err != nil { |