forked from TrueCloudLab/distribution
Merge pull request #18105 from mishak87/registry-improvements
Registry tiny code improvements
This commit is contained in:
commit
3e88c525eb
2 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@ const (
|
|||
|
||||
// DefaultV2Registry is the URI of the default v2 registry
|
||||
DefaultV2Registry = "https://registry-1.docker.io"
|
||||
)
|
||||
|
||||
var (
|
||||
// CertsDir is the directory where certificates are stored
|
||||
CertsDir = "/etc/docker/certs.d"
|
||||
)
|
||||
|
|
|
@ -62,7 +62,7 @@ func newTLSConfig(hostname string, isSecure bool) (*tls.Config, error) {
|
|||
|
||||
tlsConfig.InsecureSkipVerify = !isSecure
|
||||
|
||||
if isSecure {
|
||||
if isSecure && CertsDir != "" {
|
||||
hostDir := filepath.Join(CertsDir, cleanPath(hostname))
|
||||
logrus.Debugf("hostDir: %s", hostDir)
|
||||
if err := ReadCertsDirectory(&tlsConfig, hostDir); err != nil {
|
||||
|
|
Loading…
Reference in a new issue