Closed tgquan67 closed 5 months ago
@tgquan67 could this be the same as https://github.com/buildpacks/pack/issues/2064 in that client certs are needed (though the pack
command is different)?
It's worth noting, the pack client constructs its keychain here - since pack is optimized for local development, we assume the default keychain is sufficient but perhaps we need something more like the lifecycle keychain which can make use of IaaS credential helpers.
@natalieparellano no, these 2 problems are not related, since for normal daily usage, the registry on ACR doesn't require any client certificate.
Edit: it seems you misunderstood my case in both ticket. The cert here is for the server to verify client's identity, not the root cert in case the server is self-signed.
since for normal daily usage, the registry on ACR doesn't require any client certificate.
In that case, I suspect the problem is with the default keychain not having the right credentials
perhaps we need something more like the lifecycle keychain which can make use of IaaS credential helpers.
I could be wrong, but maybe this is what we need. Do you have any opinion here?
Okay, here is an update. When I login with az acr login -n private-registry
instead of logging in directly using a service principal, it worked properly. The ~/.docker/config.json
now looks like this
{
"auths": {
"private-registry.azurecr.io": {
"auth": "MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwOg==",
"identitytoken": "<redacted>"
}
}
}
It seems a credential helper was used, but I don't see it specified in this file.
Closing this one as it seems resolved, but feel free to reopen if not
Summary
I have a private docker repository on ACR, which I can login to, pull from and push to as normal. My run-image and build-image are also stored there. The builder is named
private-registry.azurecr.io/builder/test:latest
with the following config:EDIT: I need to clarify that in this case I logged in using a pair of service principal ID/secret with enough permission.
Reproduction
Steps
pack builder create private-registry.azurecr.io/builder/test:latest --config builder.toml
Current behavior
Expected behavior
Builder should be created without any problem.
Environment
pack info
docker info