summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-10 12:51:21 -0400
committerGitHub <noreply@github.com>2020-09-10 12:51:21 -0400
commitfc70360a3b9c23a7694ac1b00b3a9ccffb032048 (patch)
tree97bc83e1b8740a84ad967a826dab5e59de79c723 /pkg/domain/infra
parent99c91eed1d66668ccf3072a2da328e73cba7c956 (diff)
parent9c67a5f31cae5b565617893f784234aebbafb383 (diff)
downloadpodman-fc70360a3b9c23a7694ac1b00b3a9ccffb032048.tar.gz
podman-fc70360a3b9c23a7694ac1b00b3a9ccffb032048.tar.bz2
podman-fc70360a3b9c23a7694ac1b00b3a9ccffb032048.zip
Merge pull request #7576 from openSUSE/manifest-add-extend-flags
Extend the flags of the `manifest add` command
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/manifest.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go
index 6f3c6b902..55f73bf65 100644
--- a/pkg/domain/infra/abi/manifest.go
+++ b/pkg/domain/infra/abi/manifest.go
@@ -102,7 +102,24 @@ func (ir *ImageEngine) ManifestAdd(ctx context.Context, opts entities.ManifestAd
}
manifestAddOpts.Annotation = annotations
}
- listID, err := listImage.AddManifest(*ir.Libpod.SystemContext(), manifestAddOpts)
+
+ // Set the system context.
+ sys := ir.Libpod.SystemContext()
+ if sys != nil {
+ sys = &types.SystemContext{}
+ }
+ sys.AuthFilePath = opts.Authfile
+ sys.DockerInsecureSkipTLSVerify = opts.SkipTLSVerify
+ sys.DockerCertPath = opts.CertDir
+
+ if opts.Username != "" && opts.Password != "" {
+ sys.DockerAuthConfig = &types.DockerAuthConfig{
+ Username: opts.Username,
+ Password: opts.Password,
+ }
+ }
+
+ listID, err := listImage.AddManifest(*sys, manifestAddOpts)
if err != nil {
return listID, err
}
@@ -191,6 +208,7 @@ func (ir *ImageEngine) ManifestPush(ctx context.Context, names []string, opts en
}
sys.AuthFilePath = opts.Authfile
sys.DockerInsecureSkipTLSVerify = opts.SkipTLSVerify
+ sys.DockerCertPath = opts.CertDir
if opts.Username != "" && opts.Password != "" {
sys.DockerAuthConfig = &types.DockerAuthConfig{