diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-12 19:02:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-12 19:02:20 +0200 |
commit | 341f0bf66485c75db95f9e6355af1fb2f93f6005 (patch) | |
tree | e747c44296b3bd8cbcb61a7cb8e92915f05aa5cc | |
parent | ec93c9d8753c1cf346fe7fee3035af1a0dcf9b55 (diff) | |
parent | e7fdaf48db84330a4907a3c7d79462d0466fedc4 (diff) | |
download | podman-341f0bf66485c75db95f9e6355af1fb2f93f6005.tar.gz podman-341f0bf66485c75db95f9e6355af1fb2f93f6005.tar.bz2 podman-341f0bf66485c75db95f9e6355af1fb2f93f6005.zip |
Merge pull request #3793 from stefanb2/topic-pr-3788
image: add user agent to Docker registry options
-rw-r--r-- | libpod/image/docker_registry_options.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go index c191a3ca2..60bb3c33f 100644 --- a/libpod/image/docker_registry_options.go +++ b/libpod/image/docker_registry_options.go @@ -1,8 +1,12 @@ package image import ( + "fmt" + "github.com/containers/image/docker/reference" "github.com/containers/image/types" + + podmanVersion "github.com/containers/libpod/version" ) // DockerRegistryOptions encapsulates settings that affect how we connect or @@ -36,6 +40,7 @@ func (o DockerRegistryOptions) GetSystemContext(parent *types.SystemContext, add sc.SignaturePolicyPath = parent.SignaturePolicyPath sc.AuthFilePath = parent.AuthFilePath sc.DirForceCompress = parent.DirForceCompress + sc.DockerRegistryUserAgent = parent.DockerRegistryUserAgent } return sc } @@ -48,5 +53,7 @@ func GetSystemContext(signaturePolicyPath, authFilePath string, forceCompress bo } sc.AuthFilePath = authFilePath sc.DirForceCompress = forceCompress + sc.DockerRegistryUserAgent = fmt.Sprintf("libpod/%s", podmanVersion.Version) + return sc } |