-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container Exporter: Support generic repository push option #7693
Comments
The code around managing these credentials in the exporter should be significantly cleaned up during this work, as well. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
We officially support three different repository destinations when pushing an image during a
hab pkg export container
run:docker
,amazon
, andazure
. However, this is a bit misleading.docker
as the--registry-type
only really serves to default the upstream URL tohttps://index.docker.io/v1/
azure
really doesn't do anything, since you still have to supply an upstream URL, as well as a username and password. There is nothing Azure-specific about this.amazon
does invoke platform-specific logic; the credentials given are used to create a limited-use token, and that is used to do the final image push. This is to allow systems like Builder to keep one set of long-lived credentials that do not themselves have to be refreshed every 12 hours.In reality, you can push to arbitrary repositories by lying and claiming they're Azure; just provide the right URL, username, and password (in fact, if you provide the username "AWS" and use the token from
aws ecr get-login-password
as your password, you can pass your ECR URL, claim this is Azure, and upload to Amazon without a problem).The only time we really need a hint about what kind of repository we're pushing to is the Amazon case, and you want to use the same credentials over a long period of time (as from Builder).
We should simplify all this, and expose the fact that you can use any repository you want, not just Docker, Amazon, or Azure.
Aha! Link: https://chef.aha.io/features/APPDL-116
The text was updated successfully, but these errors were encountered: