Docker Hub

Integrate DockerHub in Codefresh pipelines

To configure Docker Hub so that your pipelines can push images to it, first select Docker Hub from the new registry drop down and then provide the following:

  • Registry Name - a unique name for this configuration.
  • Username - Docker Hub username.
  • Password - Docker Hub personal account token or Dockerhub account password (not recommended)

Add Docker Hub Registry

Add Docker Hub Registry

Note that Docker.io only allows you to push images that are tagged with your username. If you have a choice, create a Dockerhub account with the same username that you have in Codefresh. If not, you need to change the Docker image created to match your username in every push step.

If you have enabled two-factor-authentication in Dockerhub, then in the password field above you must put a Docker personal access token (instead of your Dockerhub master password). Otherwise Codefresh will not be able to push your image.

If you don’t have 2FA enabled in Dockerhub, then you can also use your Dockerhub account password. But in all cases we suggest you create a personal access token for Codefresh (personal access tokens are more secure as you can revoke them on demand and see when they were last used).

Adding more Dockerhub integrations

You can add additional Dockerhub accounts by using the Other Registries option from the drop-down.

Additional Docker Hub integrations

Additional Docker Hub integrations

Use your Dockerhub credentials and docker.com as the domain.

Use the appropriate registry name value in your pipelines in order to decide which Dockerhub account will be used.