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

Enable auth against multiple registries #324

Closed
PhilipBehrenberg opened this issue Jul 9, 2021 · 1 comment
Closed

Enable auth against multiple registries #324

PhilipBehrenberg opened this issue Jul 9, 2021 · 1 comment

Comments

@PhilipBehrenberg
Copy link

Issue

If a user needs to push the resulting image to a private registry they have to give the private registry's credentials, via username and password. This means that every build image will be pulled from DockerHub anonymously. This causes problems on a larger team where you can hit DockerHub's pull rate limit (100pulls/6hours).

Proposal

Allow the user to, alternatively to user/pass, supply a imagePullSecret (like you can with drone) to the plugins/docker container. This would allow a user to give credentials for any number of registries, public and private. Pulling from DockerHub with AccountA and pushing to PrivateReg with AccountB.

@bradrydzewski
Copy link
Member

bradrydzewski commented Jul 9, 2021

👋 hey there, this is supported by using the config setting like this:

- name: build
  image: plugins/docker
  settings:
    repo: foo
    tags: latest
    config: |
      {
          "auths": {
              "https://index.docker.io/v1/": {
                  "auth": "c3R...zE2"
              }
          }
      }

or with a secret like this:

- name: build
  image: plugins/docker
  settings:
    repo: foo
    tags: latest
    config:
      from_secret: bar

you can see a few other options / examples in this thread (see the Docker-in-Docker Plugins section)
https://discourse.drone.io/t/how-to-prevent-dockerhub-pull-rate-limit-errors/8324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants