summaryrefslogtreecommitdiff
path: root/pkg/bindings/images
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-02-08 14:34:01 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-02-16 06:48:35 -0500
commit690c02f602eae68335192a202ba01c8097abf111 (patch)
tree596bca2f3936085464bface72d0affaafa1d4e78 /pkg/bindings/images
parentac9a048b59ebcbdfd2cb7abb50a97981892bd6b6 (diff)
downloadpodman-690c02f602eae68335192a202ba01c8097abf111.tar.gz
podman-690c02f602eae68335192a202ba01c8097abf111.tar.bz2
podman-690c02f602eae68335192a202ba01c8097abf111.zip
Add missing params for podman-remote build
Fixes: https://github.com/containers/podman/issues/9290 Currently we still have hard coded --isolation=chroot for podman-remote build. Implement missing arguments for podman build Implements --jobs, --disable-compression, --excludes Fixes: MaxPullPushRetries RetryDuration Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r--pkg/bindings/images/build.go18
1 files changed, 17 insertions, 1 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index 8ea09b881..76f9c56e5 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 {