Skip to content

Commit

Permalink
Merge pull request #3793 from stefanb2/topic-pr-3788
Browse files Browse the repository at this point in the history
image: add user agent to Docker registry options
  • Loading branch information
openshift-merge-robot authored Aug 12, 2019
2 parents ec93c9d + e7fdaf4 commit 341f0bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libpod/image/docker_registry_options.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}

0 comments on commit 341f0bf

Please sign in to comment.