Docker Hub Registry
Push, Pull and Deploy images from Dockerhub
Codefresh has native support for interacting with Docker Hub registries.
Adding a Docker Hub integration in Codefresh allows you to reference the integration in external tools such as GitHub Actions by the name of the integration account, instead of explicit credentials. See Image enrichment overview and GitHub Action integration.
Prerequisites
Before you configure settings in Codefresh to integrate Docker Hub registry, do the following:
- Create an account or sign in to your account at Docker Hub
- (Optional)Enable 2FA (Two-Factor Authentication)
- Create a personal account token
Configure Docker Hub integration in Codefresh
Once you have completed the prerequisites, configure the Docker Hub integration settings in Codefresh.
- In the Codefresh UI, go to Integrations.
- Select Docker Hub Docker Registry, and then click Add.
- Click Add on the top-right.
- Configure the Docker Hub integration settings:
- Enter an Integration name. You can have multiple Docker Hub instances connected.
- Use this integration for All runtimes, or specific Selected runtimes.
- Username: The Docker Hub username.
- Password:
If you enabled two-factor authentication, enter the personal access token for your Docker Hub account for Codefresh to push images. Personal access tokens are more secure and can be revoked when needed. Codefresh can then push your images.
If two-factor authentication is not enabled, enter the password of your Docker Hub account (not recommended).
- To confirm, click Commit. It may take a few moments for the new integration to be synced to the cluster before it appears in the list.
Integration resource in shared configuration repo
The integration resource is created in the Git repository with the shared configuration, within resources
. The exact location depends on whether the integration is shared with all or specific runtimes:
- All runtimes: Created in
resources/all-runtimes-all-clusters/
- Selected runtimes: Created in
resources/runtimes/<runtime-name>/
Related articles
Shared configuration repo
Images
Applications dashboard
Add Git sources to runtimes