|
1 | 1 | ---
|
2 |
| -description: Get Started with Docker Hub |
| 2 | +description: Docker Hub Quickstart |
3 | 3 | keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, documentation, accounts, organizations, repositories, groups, teams
|
4 |
| -title: Get Started with Docker Hub |
| 4 | +title: Docker Hub Quickstart |
5 | 5 | redirect_from:
|
6 | 6 | - /docker-hub/overview/
|
7 | 7 | - /apidocs/docker-cloud/
|
| 8 | +- /docker-cloud/ |
8 | 9 | - /docker-cloud/migration/
|
9 | 10 | - /docker-cloud/migration/cloud-to-swarm/
|
10 | 11 | - /docker-cloud/migration/cloud-to-kube-aks/
|
@@ -72,84 +73,82 @@ redirect_from:
|
72 | 73 | - /docker-cloud/docker-errors-faq/
|
73 | 74 | - /docker-cloud/release-notes/
|
74 | 75 | - /docker-store/
|
75 |
| - |
76 | 76 | ---
|
77 | 77 |
|
78 |
| -[Docker Hub](https://hub.docker.com) is a service provided by Docker for finding and sharing container images with your team. |
79 |
| - |
80 |
| - |
81 |
| - |
82 |
| -Docker Hub provides the following major features: |
83 |
| - |
84 |
| -* [Repositories](/docker-hub/repos.md): Push and pull container images. Private |
85 |
| - repositories allow you to share container images with your team. Public |
86 |
| - repositories allow you to share them with anyone. |
87 |
| -* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private repositories. |
| 78 | +[Docker Hub](https://hub.docker.com) is a service provided by Docker for finding and sharing container images with your team. It provides the following major features: |
| 79 | +* [Repositories](/docker-hub/repos.md): Push and pull container images. |
| 80 | +* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private repositories of container images. |
88 | 81 | * [Official Images](/docker-hub/official_images.md): Pull & use high-quality container images provided by Docker.
|
89 | 82 | * [Publisher Images](/docker-hub/publish/customer_faq.md): Pull & use high-quality container
|
90 | 83 | images provided by external vendors. Certified images also include support and guarantee
|
91 | 84 | compatibility with Docker Enterprise.
|
92 |
| -* [Builds](/docker-hub/builds.md): Automatically build container images and push them to your repositories when you make changes to code in GitHub or BitBucket. |
| 85 | +* [Builds](/docker-hub/builds.md): Automatically build container images from GitHub and Bitbucket and push them to Docker Hub |
93 | 86 | * [Webhooks](/docker-hub/webhooks.md): Trigger actions after a successful push
|
94 | 87 | to a repository to integrate Docker Hub with other services.
|
95 | 88 |
|
96 | 89 |
|
97 |
| -## Sign up for Docker Hub |
98 | 90 |
|
99 |
| -Start by creating an [account](/docker-hub/accounts.md) at [https://hub.docker.com](https://hub.docker.com). |
| 91 | +### Step 1: Sign up for Docker Hub |
100 | 92 |
|
101 |
| -> **Note**: You can search for and pull Docker images from Hub without logging |
102 |
| -> in, however to push images or share them with your team, you must log in. |
| 93 | +Start by [creating an account](https://hub.docker.com/signup). |
103 | 94 |
|
104 |
| -## Find & Pull an Official Image |
| 95 | +### Step 2: Create your first repository |
105 | 96 |
|
106 |
| -Docker Hub contains a number of [Official |
107 |
| -Repositories](http://hub.docker.com/explore/). These are curated repositories from vendors and contributors to Docker. They contain Docker images from vendors like Canonical, Oracle, and Elastic that you can use as the basis to build your applications and services. |
| 97 | +To create a repo: |
| 98 | +1. Sign in to [Docker Hub](https://hub.docker.com) |
| 99 | +2. Click on Create Repository on the Docker Hub welcome page: |
108 | 100 |
|
109 |
| -With Official Images you know you're using an optimized and |
110 |
| -up-to-date image that was built by experts to power your applications. |
| 101 | + |
111 | 102 |
|
112 |
| -> **Note**: If you would like to contribute an Official Image for your |
113 |
| -> organization or product, see the documentation on |
114 |
| -> [Official Images on Docker Hub](/docker-hub/official_images.md) for more |
115 |
| -> information. |
| 103 | +3. Name it **<your_username>/my-first-repo** as shown below. Select **Private**: |
116 | 104 |
|
117 |
| -## Create your first repository and push an image to it |
| 105 | + |
118 | 106 |
|
119 |
| -To create a repo: |
120 |
| -1. Log into [Docker Hub](https://hub.docker.com) |
121 |
| -2. Click on Create Repositories on the home page: |
122 |
| -3. Name it <your namespace>/<redis> |
| 107 | +You've created your first repo. You should see: |
| 108 | + |
| 109 | + |
123 | 110 |
|
124 |
| -Next, we'll push an images |
| 111 | +### Step 3: Download and install Docker Desktop |
125 | 112 |
|
126 |
| -1. Download [Docker Desktop](https://docker.com/get-started) |
127 |
| -2. `docker pull redis` to pull the Official **redis** image from Docker Hub |
128 |
| -3. `docker tag redis <namespace>/redis` |
129 |
| -4. `docker push <namespace>/redis` |
| 113 | +We'll need to download Docker Desktop to build and push a container image to Docker Hub. |
130 | 114 |
|
131 |
| -(insert pic here) |
| 115 | +1. Download and install [Docker Desktop](https://docker.com/get-started). If on Linux, download [Docker Engine - Community](https://hub.docker.com/search?type=edition&offering=community) |
| 116 | +2. Open the terminal and sign in to Docker Hub on your computer by running `docker login` |
132 | 117 |
|
133 |
| -## Upgrading your Plan |
| 118 | +### Step 4: Build and push an image to Docker Hub from your computer |
134 | 119 |
|
135 |
| -Your Docker ID includes one private Docker Hub repository for free. If you need |
136 |
| -more private repositories, you can upgrade from your free account to a paid |
137 |
| -plan. |
| 120 | +1. Create a Dockerfile to specify your application by running: |
138 | 121 |
|
139 |
| -To upgrade, log in to Docker Hub and click [Upgrade Plan](https://hub.docker.com/account/billing-plans/), in the dropdown menu. |
| 122 | +```shell |
| 123 | +cat > Dockerfile <<EOF |
| 124 | +FROM busybox |
| 125 | +CMD echo "Hello world! This is my first Docker image." |
| 126 | +EOF |
| 127 | +``` |
140 | 128 |
|
141 |
| -(insert pic here) |
| 129 | +More on Dockerfiles [here](https://docs.docker.com/engine/reference/builder/) |
| 130 | + |
| 131 | +2. Run `docker build -t <your_username>/my-first-repo .` to build your Docker image |
| 132 | +3. Test your docker image locally by running `docker run <your_username>/my-first-repo` |
| 133 | +4. Run `docker push <your_username>/my-first-repo` to push your Docker image to Docker Hub |
| 134 | + |
| 135 | +You should see something similar to: |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | +And in Docker Hub, your repository should have a new `latest` tag available under **Tags**: |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +Congratulations! You've successfully: |
| 144 | +- Signed up for Docker Hub |
| 145 | +- Created your first repository |
| 146 | +- Built a Docker image on your computer |
| 147 | +- Pushed it to Docker Hub |
142 | 148 |
|
143 | 149 | ### Next Steps
|
144 | 150 |
|
145 |
| -You've successfully create a repo and pushed a Docker image to it. Next: |
146 |
| -- Create an [Organization](/docker-hub/orgs.md) to use Docker Hub with your team. |
147 |
| -- Automatically build container images from code via [Builds](/docker-hub/builds/index.md). |
| 151 | +- Create an [Organization](orgs.md) to use Docker Hub with your team. |
| 152 | +- Automatically build container images from code via [Builds](builds/index.md). |
148 | 153 | - [Explore](https://hub.docker.com/explore) Official & Publisher Images
|
149 |
| - |
150 |
| -### Docker Commands to Interact with Docker Hub |
151 |
| -Docker itself provides access to Docker Hub services via the |
152 |
| -[`docker search`](/engine/reference/commandline/search.md), |
153 |
| -[`pull`](/engine/reference/commandline/pull.md), |
154 |
| -[`login`](/engine/reference/commandline/login.md), and |
155 |
| -[`push`](/engine/reference/commandline/push.md) commands. |
| 154 | +- [Upgrade your plan](upgrade.md) to push additional private Docker images to Docker Hub |
0 commit comments