@@ -22,14 +22,16 @@ through creating a custom image and sharing it through Docker Hub.
2222## Step 1: Find an image in Docker Hub's library
2323
2424You can search for content in Docker Hub itself, in the Docker Desktop
25- Dashboard, or by using the ` docker search ` CLI command. Searching on Docker Hub
26- itself offers the most options to explore content.
25+ Dashboard, or by using the CLI.
2726
2827To search or browse for content on Docker Hub:
2928
29+ {{< tabs >}}
30+ {{< tab name="Docker Hub" >}}
31+
30321 . Navigate to the [ Docker Hub Explore page] ( https://hub.docker.com/explore ) .
3133
32- On the Explore page, you can browse by catalog or category, or use the search
34+ On the ** Explore** page, you can browse by catalog or category, or use the search
3335 to quickly find content.
3436
35372 . Under ** Categories** , select ** Web servers** .
@@ -48,11 +50,88 @@ To search or browse for content on Docker Hub:
4850 to use the image. On the page, you'll also find the ` docker pull ` command to
4951 pull the image.
5052
53+ {{< /tab >}}
54+ {{< tab name="Docker Desktop" >}}
55+
56+ 1 . Open the Docker Desktop Dashboard.
57+ 2 . Select the ** Docker Hub** view.
58+
59+ In the ** Docker Hub** view, you can browse by catalog or category, or use the search
60+ to quickly find content.
61+
62+ 3 . Leave the search box empty and then select ** Search** .
63+
64+ The search results are shown with additional filters now next to the search box.
65+
66+ 4 . Select the search filter icon, and then select ** Docker Official Image** and ** Web Servers** .
67+ 5 . In the results, select the ** nginx** image.
68+
69+ {{< /tab >}}
70+ {{< tab name="CLI" >}}
71+
72+ 1 . Open a terminal window.
73+
74+ > [ !TIP]
75+ >
76+ > The Docker Desktop Dashboard contains a built-in terminal. At the bottom of
77+ > the Dashboard, select ** >_ Terminal** to open it.
78+
79+ 2 . In the terminal, run the following command.
80+
81+ ``` console
82+ $ docker search --filter is-official=true nginx
83+ ```
84+
85+ Unlike the Docker Hub and Docker Desktop interfaces, you can't browse by
86+ category using the ` docker search ` command. For more details about the
87+ command, see [ docker search] ( /reference/cli/docker/search/ ) .
88+
89+ {{< /tab >}}
90+ {{< /tabs >}}
91+
5192Now that you've found an image, it's time to pull and run it on your device.
5293
5394## Step 2: Pull and run an image from Docker Hub
5495
55- 1 . In your terminal, run the following command to pull and run the Nginx image.
96+ You can run images from Docker Hub using the CLI or Docker Desktop Dashboard.
97+
98+ {{< tabs >}}
99+ {{< tab name="Docker Desktop" >}}
100+
101+ 1 . In the Docker Desktop Dashboard, select the ** nginx** image in the ** Docker
102+ Hub** view. For more details, see [ Step 1: Find an image in Docker Hub's
103+ library] ( #step-1-find-an-image-in-docker-hubs-library ) .
104+
105+ 2 . On the ** nginx** screen, select ** Run** .
106+
107+ If the image doesn't exist on your device, it is automatically pulled from
108+ Docker Hub. Pulling the image may take a few seconds or minutes depending on
109+ your connection. After the image has been pulled, a window appears in Docker
110+ Desktop and you can specify run options.
111+
112+ 3 . In the ** Host port** option, specify ` 8080 ` .
113+ 4 . Select ** Run** .
114+
115+ The container logs appear after the container starts.
116+
117+ 5 . Select the ** 8080:80** link to open the server, or visit
118+ [ https://localhost:8080 ] ( https://localhost:8080 ) in your web browser.
119+
120+ 6 . In the Docker Desktop Dashboard, select the ** Stop** button to stop the
121+ container.
122+
123+
124+ {{< /tab >}}
125+ {{< tab name="CLI" >}}
126+
127+ 1 . Open a terminal window.
128+
129+ > [ !TIP]
130+ >
131+ > The Docker Desktop Dashboard contains a built-in terminal. At the bottom of
132+ > the Dashboard, select ** >_ Terminal** to open it.
133+
134+ 2 . In your terminal, run the following command to pull and run the Nginx image.
56135
57136 ``` console
58137 $ docker run -p 8080:80 --rm nginx
@@ -95,22 +174,26 @@ Now that you've found an image, it's time to pull and run it on your device.
95174 ...
96175 ```
97176
98- 2 . Visit [ https://localhost:8080 ] ( https://localhost:8080 ) to view the default
177+ 3 . Visit [ https://localhost:8080 ] ( https://localhost:8080 ) to view the default
99178 Nginx page and verify that the container is running.
100179
101- 3 . In the terminal, press CTRL+C to stop the container.
180+ 4 . In the terminal, press < kdb >Ctrl+C</ kbd > to stop the container.
102181
103- You've now run a web server without any set up or configuration, all from a
104- single command. Docker Hub provides instant access to pre-built, ready-to-use
105- container images, letting you quickly pull and run applications without needing
106- to install or configure software manually. With Docker Hub's vast library of
107- images, you can experiment with and deploy applications effortlessly, boosting
108- productivity and making it easy to try out new tools, set up development
109- environments, or build on top of existing software.
182+ {{< /tab >}}
183+ {{< /tabs >}}
184+
185+ You've now run a web server without any set up or configuration. Docker Hub
186+ provides instant access to pre-built, ready-to-use container images, letting you
187+ quickly pull and run applications without needing to install or configure
188+ software manually. With Docker Hub's vast library of images, you can experiment
189+ with and deploy applications effortlessly, boosting productivity and making it
190+ easy to try out new tools, set up development environments, or build on top of
191+ existing software.
110192
111193You can also extend images from Docker Hub, letting you quickly build and
112194customize your own images to suit specific needs.
113195
196+
114197## Step 3: Build and push an image to Docker Hub
115198
1161991 . Create a [ Dockerfile] ( /reference/dockerfile.md ) to specify your application:
@@ -201,6 +284,11 @@ customize your own images to suit specific needs.
201284
202285## Step 4: View your repository on Docker Hub and explore options
203286
287+ You can view your Docker Hub repositories in the Docker Hub or Docker Desktop interface.
288+
289+ {{< tabs >}}
290+ {{< tab name="Docker Hub" >}}
291+
2042921 . Go to [ Docker Hub] ( https://hub.docker.com ) and sign in.
205293
206294 After signing in, you should be on the ** Repositories** page. If not, then go
@@ -211,6 +299,22 @@ customize your own images to suit specific needs.
211299 After selecting the repository, you should see more details and options for
212300 your repository.
213301
302+ {{< /tab >}}
303+ {{< tab name="Docker Desktop" >}}
304+
305+ 1 . Sign in to Docker Desktop.
306+ 2 . Select the ** Images** view.
307+ 3 . Select the ** Hub repositories** tab.
308+
309+ A list of your Docker Hub repositories appears.
310+
311+ 4 . Find the ** nginx-custom** repository, hover over the row, and then select ** View in Hub** .
312+
313+ Docker Hub opens and you are able to view more details about the image.
314+
315+ {{< /tab >}}
316+ {{< /tabs >}}
317+
214318You've now verified that your repository exists on Docker Hub, and you've
215319discovered more options for it. View the next steps to learn more about some of
216320these options.
0 commit comments