summaryrefslogtreecommitdiff
path: root/pkg/bindings/images
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/images')
-rw-r--r--pkg/bindings/images/build.go24
-rw-r--r--pkg/bindings/images/diff.go2
-rw-r--r--pkg/bindings/images/images.go10
-rw-r--r--pkg/bindings/images/pull.go6
-rw-r--r--pkg/bindings/images/rm.go8
-rw-r--r--pkg/bindings/images/types_diff_options.go2
-rw-r--r--pkg/bindings/images/types_exists_options.go2
-rw-r--r--pkg/bindings/images/types_export_options.go2
-rw-r--r--pkg/bindings/images/types_get_options.go2
-rw-r--r--pkg/bindings/images/types_history_options.go2
-rw-r--r--pkg/bindings/images/types_import_options.go2
-rw-r--r--pkg/bindings/images/types_list_options.go2
-rw-r--r--pkg/bindings/images/types_load_options.go2
-rw-r--r--pkg/bindings/images/types_prune_options.go2
-rw-r--r--pkg/bindings/images/types_pull_options.go2
-rw-r--r--pkg/bindings/images/types_push_options.go2
-rw-r--r--pkg/bindings/images/types_remove_options.go2
-rw-r--r--pkg/bindings/images/types_search_options.go2
-rw-r--r--pkg/bindings/images/types_tag_options.go2
-rw-r--r--pkg/bindings/images/types_tree_options.go2
-rw-r--r--pkg/bindings/images/types_untag_options.go2
21 files changed, 49 insertions, 33 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index 8ea09b881..6e16461e5 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -16,9 +16,9 @@ import (
"strings"
"github.com/containers/buildah"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/storage/pkg/fileutils"
"github.com/docker/go-units"
"github.com/hashicorp/go-multierror"
@@ -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 {
diff --git a/pkg/bindings/images/diff.go b/pkg/bindings/images/diff.go
index 8802c15e2..79b0df8c9 100644
--- a/pkg/bindings/images/diff.go
+++ b/pkg/bindings/images/diff.go
@@ -4,7 +4,7 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/bindings"
"github.com/containers/storage/pkg/archive"
)
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go
index 37750bc6c..1be2bdfdd 100644
--- a/pkg/bindings/images/images.go
+++ b/pkg/bindings/images/images.go
@@ -8,11 +8,11 @@ import (
"net/url"
"strconv"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/domain/entities/reports"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/domain/entities/reports"
"github.com/pkg/errors"
)
diff --git a/pkg/bindings/images/pull.go b/pkg/bindings/images/pull.go
index 9149b7445..f4da2d521 100644
--- a/pkg/bindings/images/pull.go
+++ b/pkg/bindings/images/pull.go
@@ -11,9 +11,9 @@ import (
"os"
"strconv"
- "github.com/containers/podman/v2/pkg/auth"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/auth"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
"github.com/hashicorp/go-multierror"
)
diff --git a/pkg/bindings/images/rm.go b/pkg/bindings/images/rm.go
index e652e66aa..beecce7bf 100644
--- a/pkg/bindings/images/rm.go
+++ b/pkg/bindings/images/rm.go
@@ -4,10 +4,10 @@ import (
"context"
"net/http"
- "github.com/containers/podman/v2/pkg/api/handlers"
- "github.com/containers/podman/v2/pkg/bindings"
- "github.com/containers/podman/v2/pkg/domain/entities"
- "github.com/containers/podman/v2/pkg/errorhandling"
+ "github.com/containers/podman/v3/pkg/api/handlers"
+ "github.com/containers/podman/v3/pkg/bindings"
+ "github.com/containers/podman/v3/pkg/domain/entities"
+ "github.com/containers/podman/v3/pkg/errorhandling"
)
// Remove removes one or more images from the local storage. Use optional force option to remove an
diff --git a/pkg/bindings/images/types_diff_options.go b/pkg/bindings/images/types_diff_options.go
index ae4b4655b..f15a9a696 100644
--- a/pkg/bindings/images/types_diff_options.go
+++ b/pkg/bindings/images/types_diff_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_exists_options.go b/pkg/bindings/images/types_exists_options.go
index 9de1b9878..2326c398b 100644
--- a/pkg/bindings/images/types_exists_options.go
+++ b/pkg/bindings/images/types_exists_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_export_options.go b/pkg/bindings/images/types_export_options.go
index dcce565f6..0c5a3390c 100644
--- a/pkg/bindings/images/types_export_options.go
+++ b/pkg/bindings/images/types_export_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_get_options.go b/pkg/bindings/images/types_get_options.go
index b9d00d82c..33da7b0be 100644
--- a/pkg/bindings/images/types_get_options.go
+++ b/pkg/bindings/images/types_get_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_history_options.go b/pkg/bindings/images/types_history_options.go
index e2cd43852..191375390 100644
--- a/pkg/bindings/images/types_history_options.go
+++ b/pkg/bindings/images/types_history_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_import_options.go b/pkg/bindings/images/types_import_options.go
index ff409cc7c..333e841e6 100644
--- a/pkg/bindings/images/types_import_options.go
+++ b/pkg/bindings/images/types_import_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_list_options.go b/pkg/bindings/images/types_list_options.go
index 38d1bde70..e86157f59 100644
--- a/pkg/bindings/images/types_list_options.go
+++ b/pkg/bindings/images/types_list_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_load_options.go b/pkg/bindings/images/types_load_options.go
index d17e7cc10..7b2e504d9 100644
--- a/pkg/bindings/images/types_load_options.go
+++ b/pkg/bindings/images/types_load_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_prune_options.go b/pkg/bindings/images/types_prune_options.go
index deef211c1..6bd0c0f6f 100644
--- a/pkg/bindings/images/types_prune_options.go
+++ b/pkg/bindings/images/types_prune_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_pull_options.go b/pkg/bindings/images/types_pull_options.go
index 2220ade26..0611c4447 100644
--- a/pkg/bindings/images/types_pull_options.go
+++ b/pkg/bindings/images/types_pull_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go
index be14e7d78..2593c2fe0 100644
--- a/pkg/bindings/images/types_push_options.go
+++ b/pkg/bindings/images/types_push_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_remove_options.go b/pkg/bindings/images/types_remove_options.go
index 964fca265..d591aae88 100644
--- a/pkg/bindings/images/types_remove_options.go
+++ b/pkg/bindings/images/types_remove_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_search_options.go b/pkg/bindings/images/types_search_options.go
index 1321d1910..a437a0934 100644
--- a/pkg/bindings/images/types_search_options.go
+++ b/pkg/bindings/images/types_search_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_tag_options.go b/pkg/bindings/images/types_tag_options.go
index 74977e10a..25cb8f68b 100644
--- a/pkg/bindings/images/types_tag_options.go
+++ b/pkg/bindings/images/types_tag_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_tree_options.go b/pkg/bindings/images/types_tree_options.go
index a07a3a647..43178113d 100644
--- a/pkg/bindings/images/types_tree_options.go
+++ b/pkg/bindings/images/types_tree_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*
diff --git a/pkg/bindings/images/types_untag_options.go b/pkg/bindings/images/types_untag_options.go
index 3f7ac4a5a..520cf7a49 100644
--- a/pkg/bindings/images/types_untag_options.go
+++ b/pkg/bindings/images/types_untag_options.go
@@ -3,7 +3,7 @@ package images
import (
"net/url"
- "github.com/containers/podman/v2/pkg/bindings/util"
+ "github.com/containers/podman/v3/pkg/bindings/internal/util"
)
/*