Home Explore Blog CI



docker

2nd chunk of `content/get-started/docker-concepts/the-basics/what-is-a-registry.md`
b381c55d0772e55dde598f87b87783d60a49ccc976686ea200000001000009c2
|                                       |
+---------------------------------------+
```

> [!NOTE]
>
> You can create one private repository and unlimited public repositories using the free version of Docker Hub. For more information, visit the [Docker Hub subscription page](https://www.docker.com/pricing/).

## Try it out

In this hands-on, you will learn how to build and push a Docker image to the Docker Hub repository.

### Sign up for a free Docker account

1. If you haven't created one yet, head over to the [Docker Hub](https://hub.docker.com) page to sign up for a new Docker account.

    ![Screenshot of the official Docker Hub page showing the Sign up page](/Users/baehyunsol/Documents/Rust/ragit/sample/docker/content/get-started/docker-concepts/the-basics/images/dockerhub-signup.webp?border)

    You can use your Google or GitHub account to authenticate.

### Create your first repository

1. Sign in to [Docker Hub](https://hub.docker.com).
2. Select the **Create repository** button in the top-right corner.
3. Select your namespace (most likely your username) and enter `docker-quickstart` as the repository name.

    ![Screenshot of the Docker Hub page that shows how to create a public repository](/Users/baehyunsol/Documents/Rust/ragit/sample/docker/content/get-started/docker-concepts/the-basics/images/create-hub-repository.webp?border)

4. Set the visibility to **Public**. 
5. Select the **Create** button to create the repository.

That's it. You've successfully created your first repository. 🎉

This repository is empty right now. You'll now fix this by pushing an image to it.

### Sign in with Docker Desktop

1. [Download and install](https://www.docker.com/products/docker-desktop/) Docker Desktop, if not already installed.
2. In the Docker Desktop GUI, select the **Sign in** button in the top-right corner

### Clone sample Node.js code

In order to create an image, you first need a project. To get you started quickly, you'll use a sample Node.js project found at [github.com/dockersamples/helloworld-demo-node](https://github.com/dockersamples/helloworld-demo-node). This repository contains a pre-built Dockerfile necessary for building a Docker image.

Don't worry about the specifics of the Dockerfile, as you'll learn about that in later sections.

1. Clone the GitHub repository using the following command:

    ```console
    git clone https://github.com/dockersamples/helloworld-demo-node
    ```

2. Navigate into the newly created directory.

Title: Creating a Docker Hub Repository and Preparing Sample Code
Summary
This section provides a hands-on guide to creating a repository on Docker Hub. It walks through the steps of logging in, creating a new public repository named `docker-quickstart`, and notes that a free Docker Hub account allows for one private repository and unlimited public ones. It then explains how to download and sign in to Docker Desktop, clone a sample Node.js project from GitHub that contains a Dockerfile, and navigate into the project directory.