Skip to content

Conversation

@clnperez
Copy link
Contributor

If, for some reason, the certs directory has permissions that are
inaccessible by docker, we should still be able to fetch manifests using
the insecure flag.

Since the cli doesn't access the engine's list of insecure registries,
the registry client should make a singleton list of the registry being queried with the
insecure flag.

Closes #1358

Signed-off-by: Christy Norman [email protected]

@codecov-io
Copy link

codecov-io commented Sep 18, 2018

Codecov Report

Merging #1378 into master will decrease coverage by 0.09%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #1378     +/-   ##
=========================================
- Coverage   54.88%   54.79%   -0.1%     
=========================================
  Files         293      293             
  Lines       19428    19428             
=========================================
- Hits        10663    10645     -18     
- Misses       8089     8110     +21     
+ Partials      676      673      -3

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

serviceOpts := registry.ServiceOptions{}
if insecure {
logrus.Debugf("allowing insecure registry for: %s", reference.Domain(namedRef))
serviceOpts.InsecureRegistries = []string{reference.Domain(namedRef)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name was a bit confusing, so checked if reference.Domain() returned the port-number as well, but looks like it does 😅 👍 https://github.com/docker/distribution/blob/6170ac53daed40ebbebc9fe5f482495d01f09f12/reference/reference_test.go#L51-L55

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it does. i double-checked that b/c i had the same concern. :) thanks @thaJeztah!

@thaJeztah
Copy link
Member

ping @justincormack @silvin-lubecki ptal

}
registryService, err := registry.NewService(registry.ServiceOptions{})

serviceOpts := registry.ServiceOptions{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: var serviceOpts registry.ServiceOptions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed that and re-pushed

Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

If, for some reason, the certs directory has permissions that are
inaccessible by docker, we should still be able to fetch manifests using
the `insecure` flag.

Since the cli doesn't access the engine's list of insecure registries,
the registry client should make a singleton list of the registry being queried with the
`insecure` flag.

Closes docker#1358

Signed-off-by: Christy Norman <[email protected]>
@clnperez clnperez force-pushed the manifest-inspect-insecure-fix branch from 7e84791 to d57adbc Compare September 20, 2018 15:51
Copy link
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐯

@thaJeztah
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants