What is Docker Hub? (original) (raw)

Last Updated : 1 Sep, 2025

Docker Hub is a cloud-based repository service where developers and teams can push (upload) and pull (download) Docker container images anytime via the internet.

dockerhub

Creating Repository in Docker Hub

The following steps guide you in creating a first repository in Dockerhub using GUI:

**Step 1: Firstly navigate to the Dockerhub and sign in with your credentials and then select Create Repository.

Create repository

**Step 2: After that, we will be taken to a screen for configuring the repository, where we must choose the namespace, repository name, and optional description.

Configure repository

**Step 3: At finally repository is created with the help of the Docker Commands we can push or pull the image. The following command is used for pushing the docker image that exists in local to the Dockerhub.

docker push /my-testprivate-repo>.

pushing docker images

Push Docker Images to Docker Hub

The push command as the name suggests itself is used to pushing a docker image onto the docker hub.Try to Follow this example to get an idea of the push command:

**Step 1: Open Docker in your system. Locate the Images that you want to push using the below command:

docker images

Docker images

The above command will list all the images on your system.

**Step 2: Go to the browser and search _hub.docker.com.

**Step 3: Sign up on the docker hub if you do not have a docker hub account, after login on to docker hub.

**Step 4: Back to the docker terminal and execute the below command:

docker login

**Step 5: Then give your credential and type in your docker hub username or password.

Docker login

**Step 6: After that hit the Enter key you will see login success on your screen.

**Step 7: Then type the tag images name, docker hub username, and give the name it appears on the docker hub using the below command:

docker tag geeksforgeek mdahtisham/geeksimage

      geeksforgeek - Image name  
      mdahtisham - Docker hub username  
      geeksimage - With this name Image will appear on the docker hub

**Step 8: Now push your image using the below command:

docker push mdahtisham/geeksimage

Docker push

**Note: Below you can see the Docker Image successfully pushed on the docker hub: mdahtisham/geeksimage

Docker hub Repository

Pull Docker Images From Docker Hub

The pull command is used to get an image from the Docker Hub to the local docker environment.Follow this example to get an overview of the pull command in Docker:

**Step 1: Now you can search the image using the below command in docker as follows:

docker search _imagename

One can see all images on your screen if available images with this name.One can also pull the images if one knows the exact name

**Step 2: Now pull the image see the below command.

docker pull mdahtisham/geeksimage

mdahtisham - Docker Hub username
geeksimage - With this name Image will appear on the docker hub

Docker pull

**Step 3: Now check for the pulled image in the local docker environment using the below command:

docker images

Docker images

Docker Hub Web Services

Docker Hub offers a variety of web services designed to help developers manage, collaborate, and deploy container images effectively. These features make Docker Hub a useful platform for developers to store, manage, and collaborate on containerized applications throughout the development and deployment process. Here’s a look at what it provides:

Difference Between Github and Docker Hub

The following are the difference between github and dockerhub:

Feature GitHub Docker Hub
**Primary Purpose Code Repository and Version Control Docker Image Repository and Management
**Content Source Code, Documentation Docker Container Images
**Integration Works with CI/CD tools like Jenkins, Travis CI Integrates with CI/CD tools and Docker itself
**Visibility Public and Private Repositories Public and Private Repositories
**Security Code scanning and vulnerability alerts Image security scans and vulnerability reports

Docker Hub Usage and Rate Limits

1. Understanding Docker Hub Usage

On Docker Hub, "usage" refers to both the data you store on the platform and the amount of data you transfer by pulling images. Regularly monitoring this usage can help you manage resources more effectively and avoid extra charges. Keeping an eye on usage is also a great way to ensure your CI/CD processes and development workflows run smoothly without interruptions.

2. Fair Use Policy

Docker Hub enforces a fair use policy to keep the platform running smoothly for everyone. This means if your account starts to use an unusually high amount of data, with excessive pull requests or storage, Docker Hub may temporarily slow down (throttle) your activity or impose restrictions. This is meant to prevent any single user from impacting the performance for others.

3. How to View and Track Usage?

Docker Hub makes it easy to keep tabs on your data usage:

4. Tips for Optimizing Usage

To make the most of your Docker Hub account and manage data effectively:

5. Pull Attribution

6. Docker Hub Rate Limits for Pulls

Depending on your account type, Docker Hub applies different pull limits:

Account Type Pull Limit (Every 6 Hours) Daily Pull Limit Additional Options
Anonymous Users 100 pulls per IP N/A None
Authenticated Users 200 pulls per IP N/A None
Paid Subscribers Customizable Up to 5,000 pulls Add-ons available

7. Checking Your Docker Hub Rate Limits

If you exceed your rate limits, Docker Hub will respond with a ****'429'** status code, meaning you’ve hit the cap. You can also use API response headers to check where you stand with your current pull limit in real time, which helps you adjust if you’re nearing the threshold.

Authenticate Docker Hub Pull Requests

To authenticate pull requests on Docker Hub, follow the instructions specific to your platform:

1. Docker Desktop

2. Docker Engine

3. Docker Swarm

If you're using Docker Swarm, add the ****'--with-registry-auth'** flag to your command for authentication with Docker Hub.

4. GitHub Actions

5. Kubernetes

6. Third-Party Platforms

For third-party services, check the specific instructions from your provider on how to authenticate with the Docker registry. Some examples include:

Difference Between Dockerhub and Docker Registry

The following are the differences between Dockerhub and Docker Registry:

Feature Docker Hub Docker Registry
**Service Type Cloud-based repository service Self-hosted registry service
**Accessibility Public and private image repositories Primarily private, customizable
**Integration Integrates with GitHub, Jenkins, and more Can be integrated with various CI/CD tools
**Security Built-in security scans and vulnerability reports Security depends on implementation
**Automation Supports webhooks for CI/CD automation Requires manual setup for automation

Best Practices For Docker Hub Security

To enhance security and mitigate risks associated with container images on Docker Hub, consider implementing the following best practices:

1. Select the appropriate base image

2. Utilize multi-stage builds

3. Scan images during development

4. Scan images in production