1

I was asked to use Docker Hub as part of a build/deploy pipeline. I am supposed to provide some authentication credentials to a third-party tool, so that this tool can push container images to private repos.

Now, I don't see any place where I can generate secrets/API key that are safe to give to that third-party. Am I missing something? In Amazon for example I can create roles with IAM.

Note: The platform I tried to use is banzaicloud.com . Trying to setup a basic Nodejs app following their instructions. As far as I'm concerned, the problem of authentication should not be on the third-party tools side. The same way I can generate API keys for any kind of service and use them in whatever client I want. In the platform I refer to, it seems only the "full docker hub account" credentials can be used instead of some kind of dedicated third party mechanism (like API keys or IAM, etc).

0
1

You can generate an access token for docker hub by going here:

https://hub.docker.com/settings/security

And creating a new access token.

It's essentially the same process for organisational access tokens or for personal access tokens IIRC.

Once you have generated the access token you can literally just use that token instead of the password for most docker hub operations (ie. docker login --username $user --password $token)

0

If you are using Jenkins the answer is in this document:

https://getintodevops.com/blog/building-your-first-docker-image-with-jenkins-2-guide-for-developers

enter image description here

enter image description here

2
  • 1
    Hello, as far as I understand I need credentials from DockerHub, not the other way around.
    – Kev
    Jan 18 '19 at 0:46
  • @amida Make sure to mask them in your build pipeline as well so that they do not show up in the logs or in the console dump... Jan 20 '19 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.