Clairctl - Auth header for private registry #1470
-
When trying to generate the manifest for a container image in AWS ECR, we need to include an Authorisation header for the GET to succeed. I don't see a way to do this, so currently clairctl manifest returns an Unauthorised response. How do we make sure this header is being added by clairctl? If this is not possible, how do we generate the manifest that should be submitted to the indexer? Is is just a case of pulling the manifest and then the uri of the layer is the blob url for that layer? I tried to look at the code, but my lack of experience in Go hampers me a bit to fully understand how this manifest is generated, but this is at least how I understand the code when looking at manifest.go. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
So to work with ECR is fairly straight forward in the end. The AWS ECR SDK provides a way to get a token which should then be added to the Authorization Header for subsequent http calls. The SDK also has a way to get a signed download link for a layer. The flow would most describes what need to happen. [AWS SDK] Get ECR Auth Token Should now have the information to build the manifest for the |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Clairctl
should honor a docker client config file, e.g.~/.docker/config.json
.