Skip to content
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

Open
christophermaier opened this issue May 18, 2020 · 3 comments
Open

Container Exporter: Support generic repository push option #7693

christophermaier opened this issue May 18, 2020 · 3 comments

Comments

@christophermaier
Copy link
Contributor

christophermaier commented May 18, 2020

We officially support three different repository destinations when pushing an image during a hab pkg export container run: docker, amazon, and azure. However, this is a bit misleading.

  • Specifying docker as the --registry-type only really serves to default the upstream URL to https://index.docker.io/v1/
  • Specifying 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.
  • Specifying 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

@christophermaier
Copy link
Contributor Author

The code around managing these credentials in the exporter should be significantly cleaned up during this work, as well.

@stale
Copy link

stale bot commented May 19, 2021

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.

@stale
Copy link

stale bot commented Jun 12, 2022

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.

@stale stale bot added the Stale label Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants