diff options
Diffstat (limited to 'pkg/bindings/images')
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..5d7c18cc8 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/util" ) /* diff --git a/pkg/bindings/images/types_exists_options.go b/pkg/bindings/images/types_exists_options.go index 9de1b9878..88efb03c8 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/util" ) /* diff --git a/pkg/bindings/images/types_export_options.go b/pkg/bindings/images/types_export_options.go index dcce565f6..b87c99d12 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/util" ) /* diff --git a/pkg/bindings/images/types_get_options.go b/pkg/bindings/images/types_get_options.go index b9d00d82c..4d892aa29 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/util" ) /* diff --git a/pkg/bindings/images/types_history_options.go b/pkg/bindings/images/types_history_options.go index e2cd43852..424fbfd37 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/util" ) /* diff --git a/pkg/bindings/images/types_import_options.go b/pkg/bindings/images/types_import_options.go index ff409cc7c..5eb30adfc 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/util" ) /* diff --git a/pkg/bindings/images/types_list_options.go b/pkg/bindings/images/types_list_options.go index 38d1bde70..d3d5b2046 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/util" ) /* diff --git a/pkg/bindings/images/types_load_options.go b/pkg/bindings/images/types_load_options.go index d17e7cc10..75b5566d6 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/util" ) /* diff --git a/pkg/bindings/images/types_prune_options.go b/pkg/bindings/images/types_prune_options.go index deef211c1..06378b56d 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/util" ) /* diff --git a/pkg/bindings/images/types_pull_options.go b/pkg/bindings/images/types_pull_options.go index 2220ade26..3ea23fc02 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/util" ) /* diff --git a/pkg/bindings/images/types_push_options.go b/pkg/bindings/images/types_push_options.go index be14e7d78..3cb3ec937 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/util" ) /* diff --git a/pkg/bindings/images/types_remove_options.go b/pkg/bindings/images/types_remove_options.go index 964fca265..81a717bf8 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/util" ) /* diff --git a/pkg/bindings/images/types_search_options.go b/pkg/bindings/images/types_search_options.go index 1321d1910..a0e95a0b1 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/util" ) /* diff --git a/pkg/bindings/images/types_tag_options.go b/pkg/bindings/images/types_tag_options.go index 74977e10a..1a0e05640 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/util" ) /* diff --git a/pkg/bindings/images/types_tree_options.go b/pkg/bindings/images/types_tree_options.go index a07a3a647..b03d2282a 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/util" ) /* diff --git a/pkg/bindings/images/types_untag_options.go b/pkg/bindings/images/types_untag_options.go index 3f7ac4a5a..a8004b21e 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/util" ) /* |