Allow pushing a manifest to a registry with self-signed TLS certificate #1952
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
This change enables iterating over all available registry endpoints when pushing a manifest. Before this change, only one endpoint was used. The scheme of that endpoint was set to HTTP if the registry was marked as insecure even if the registry was available via HTTPS. This resulted in an error because a HTTP request was sent to a HTTPS endpoint.
Fixes #1951
- How I did it
The change re-uses the function
client.iterateEndpoints()
that was already available. Because that function was only used for reading previously, another parameterlookup
of typefunc
has been added to it.lookup
is used to get the endpoints to query.- How to verify it
127.0.0.1:52854
.docker manifest create to create a new manifest
docker manifest push 127.0.0.1:52854/debian:stretch-slim-latest
- Description for the changelog
Allow pushing a manifest to a registry with self-signed TLS certificate