summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-23 13:15:47 +0100
committerGitHub <noreply@github.com>2022-03-23 13:15:47 +0100
commita8743d3327b9a97ea812632885492d95c816d79a (patch)
treea484397dcb515c20e1e6c62fe7a08510794e1581 /pkg/domain
parent9d8972e0ee665325a2519eb168423d773856d563 (diff)
parenteedce31eb4aa8c0678c24cdf907ebd971ce02233 (diff)
downloadpodman-a8743d3327b9a97ea812632885492d95c816d79a.tar.gz
podman-a8743d3327b9a97ea812632885492d95c816d79a.tar.bz2
podman-a8743d3327b9a97ea812632885492d95c816d79a.zip
Merge pull request #13588 from flouthoc/import-os-arch
import: allow users to set `--os`, `--arch` and `--variant` of image imports
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/images.go1
-rw-r--r--pkg/domain/infra/abi/images.go3
-rw-r--r--pkg/domain/infra/tunnel/images.go1
3 files changed, 4 insertions, 1 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index 93334fc6a..7081c5d25 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -279,6 +279,7 @@ type ImageLoadReport struct {
type ImageImportOptions struct {
Architecture string
+ Variant string
Changes []string
Message string
OS string
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index 3fdfa8f3a..74478b26d 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -445,7 +445,8 @@ func (ir *ImageEngine) Import(ctx context.Context, options entities.ImageImportO
importOptions.Tag = options.Reference
importOptions.SignaturePolicyPath = options.SignaturePolicy
importOptions.OS = options.OS
- importOptions.Architecture = options.Architecture
+ importOptions.Arch = options.Architecture
+ importOptions.Variant = options.Variant
if !options.Quiet {
importOptions.Writer = os.Stderr
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 62eacb19f..18e10e8dd 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -230,6 +230,7 @@ func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOpti
f *os.File
)
options := new(images.ImportOptions).WithChanges(opts.Changes).WithMessage(opts.Message).WithReference(opts.Reference)
+ options.WithOS(opts.OS).WithArchitecture(opts.Architecture).WithVariant(opts.Variant)
if opts.SourceIsURL {
options.WithURL(opts.Source)
} else {