From 2ac9cb762db9d458bcf64289c288b4df397f2857 Mon Sep 17 00:00:00 2001 From: craig-osterhout Date: Tue, 23 Aug 2022 14:16:37 -0700 Subject: [PATCH 1/6] add pull image to hub quickstart --- docker-hub/index.md | 48 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/docker-hub/index.md b/docker-hub/index.md index 2054d2a2e8..64d1463eea 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -125,14 +125,53 @@ To create a repository: ### Step 3: Download and install Docker Desktop -We'll need to download Docker Desktop to build and push a container image to -Docker Hub. +You'll need to download Docker Desktop to build, push, and pull container images. 1. Download and install [Docker Desktop](../desktop/#download-and-install). 2. Sign in to the Docker Desktop application using the Docker ID you've just created. -### Step 4: Build and push a container image to Docker Hub from your computer +### Step 4: Pull and run a container image from Docker Hub + +1. Run `docker pull hello-world` to pull the image from Docker Hub. You should see output similar to: + +```console +$ docker pull hello-world +Using default tag: latest +latest: Pulling from library/hello-world +2db29710123e: Pull complete +Digest: sha256:7d246653d0511db2a6b2e0436cfd0e52ac8c066000264b3ce63331ac66dca625 +Status: Downloaded newer image for hello-world:latest +docker.io/library/hello-world:latest +``` + +2. Run `docker run hellow-world` to run the image locally. You should see output similar to: + +```console +$ docker run hellow-world +Hello from Docker! +This message shows that your installation appears to be working correctly. + +To generate this message, Docker took the following steps: + 1. The Docker client contacted the Docker daemon. + 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. + (amd64) + 3. The Docker daemon created a new container from that image which runs the + executable that produces the output you are currently reading. + 4. The Docker daemon streamed that output to the Docker client, which sent it + to your terminal. + +To try something more ambitious, you can run an Ubuntu container with: + $ docker run -it ubuntu bash + +Share images, automate workflows, and more with a free Docker ID: + https://hub.docker.com/ + +For more examples and ideas, visit: + https://docs.docker.com/get-started/ +``` + +### Step 5: Build and push a container image to Docker Hub from your computer 1. Start by creating a [Dockerfile](../engine/reference/builder/) to specify your application as shown below: @@ -164,7 +203,8 @@ Congratulations! You've successfully: - Signed up for a Docker account - Created your first repository -- Built a Docker container image on your computer +- Pulled an existing container image from Docker Hub +- Built your own container image on your computer - Pushed it successfully to Docker Hub ### Next steps From cb1acd8431634a3d1eb6780b819fefec9dac2c0c Mon Sep 17 00:00:00 2001 From: craig-osterhout Date: Tue, 23 Aug 2022 15:05:15 -0700 Subject: [PATCH 2/6] attempt to fix ordered list --- docker-hub/index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-hub/index.md b/docker-hub/index.md index 64d1463eea..e567c677f0 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -134,7 +134,6 @@ You'll need to download Docker Desktop to build, push, and pull container image ### Step 4: Pull and run a container image from Docker Hub 1. Run `docker pull hello-world` to pull the image from Docker Hub. You should see output similar to: - ```console $ docker pull hello-world Using default tag: latest @@ -144,7 +143,6 @@ Digest: sha256:7d246653d0511db2a6b2e0436cfd0e52ac8c066000264b3ce63331ac66dca625 Status: Downloaded newer image for hello-world:latest docker.io/library/hello-world:latest ``` - 2. Run `docker run hellow-world` to run the image locally. You should see output similar to: ```console From d1479e65f60065e76ff20ebfa3f7e31708e87163 Mon Sep 17 00:00:00 2001 From: craig-osterhout Date: Tue, 23 Aug 2022 15:25:20 -0700 Subject: [PATCH 3/6] Fix typo and ordered list --- docker-hub/index.md | 58 +++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/docker-hub/index.md b/docker-hub/index.md index e567c677f0..eaedf05ce5 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -134,40 +134,42 @@ You'll need to download Docker Desktop to build, push, and pull container image ### Step 4: Pull and run a container image from Docker Hub 1. Run `docker pull hello-world` to pull the image from Docker Hub. You should see output similar to: -```console -$ docker pull hello-world -Using default tag: latest -latest: Pulling from library/hello-world -2db29710123e: Pull complete -Digest: sha256:7d246653d0511db2a6b2e0436cfd0e52ac8c066000264b3ce63331ac66dca625 -Status: Downloaded newer image for hello-world:latest -docker.io/library/hello-world:latest -``` + + ```console + $ docker pull hello-world + Using default tag: latest + latest: Pulling from library/hello-world + 2db29710123e: Pull complete + Digest: sha256:7d246653d0511db2a6b2e0436cfd0e52ac8c066000264b3ce63331ac66dca625 + Status: Downloaded newer image for hello-world:latest + docker.io/library/hello-world:latest + ``` + 2. Run `docker run hellow-world` to run the image locally. You should see output similar to: -```console -$ docker run hellow-world -Hello from Docker! -This message shows that your installation appears to be working correctly. + ```console + $ docker run hello-world + Hello from Docker! + This message shows that your installation appears to be working correctly. -To generate this message, Docker took the following steps: - 1. The Docker client contacted the Docker daemon. - 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. - (amd64) - 3. The Docker daemon created a new container from that image which runs the - executable that produces the output you are currently reading. - 4. The Docker daemon streamed that output to the Docker client, which sent it - to your terminal. + To generate this message, Docker took the following steps: + 1. The Docker client contacted the Docker daemon. + 2. The Docker daemon pulled the "hello-world" image from the Docker Hub + (amd64) + 3. The Docker daemon created a new container from that image which runs the + executable that produces the output you are currently reading. + 4. The Docker daemon streamed that output to the Docker client, which sent + it to your terminal. -To try something more ambitious, you can run an Ubuntu container with: - $ docker run -it ubuntu bash + To try something more ambitious, you can run an Ubuntu container with: + $ docker run -it ubuntu bash -Share images, automate workflows, and more with a free Docker ID: - https://hub.docker.com/ + Share images, automate workflows, and more with a free Docker ID: + https://hub.docker.com/ -For more examples and ideas, visit: - https://docs.docker.com/get-started/ -``` + For more examples and ideas, visit: + https://docs.docker.com/get-started/ + ``` ### Step 5: Build and push a container image to Docker Hub from your computer From 2c52e7690e555188a0d954306252a7916043eee3 Mon Sep 17 00:00:00 2001 From: craig-osterhout Date: Tue, 23 Aug 2022 15:29:25 -0700 Subject: [PATCH 4/6] Fix typo --- docker-hub/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-hub/index.md b/docker-hub/index.md index eaedf05ce5..3abe0cb09c 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -154,7 +154,7 @@ You'll need to download Docker Desktop to build, push, and pull container image To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. - 2. The Docker daemon pulled the "hello-world" image from the Docker Hub + 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. From 71dc0335202c5a8eb0d6915ca41a92acdca3d076 Mon Sep 17 00:00:00 2001 From: craig-osterhout Date: Tue, 23 Aug 2022 15:32:47 -0700 Subject: [PATCH 5/6] Fix typo --- docker-hub/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-hub/index.md b/docker-hub/index.md index 3abe0cb09c..eef85478f1 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -145,7 +145,7 @@ You'll need to download Docker Desktop to build, push, and pull container image docker.io/library/hello-world:latest ``` -2. Run `docker run hellow-world` to run the image locally. You should see output similar to: +2. Run `docker run hello-world` to run the image locally. You should see output similar to: ```console $ docker run hello-world From 3ceb14581ae8d9cabd0b20a5f2aab3173bc03272 Mon Sep 17 00:00:00 2001 From: craig-osterhout Date: Mon, 29 Aug 2022 11:51:52 -0700 Subject: [PATCH 6/6] fix typo --- docker-hub/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-hub/index.md b/docker-hub/index.md index eef85478f1..98c4509ce7 100644 --- a/docker-hub/index.md +++ b/docker-hub/index.md @@ -125,7 +125,7 @@ To create a repository: ### Step 3: Download and install Docker Desktop -You'll need to download Docker Desktop to build, push, and pull container images. +You'll need to download Docker Desktop to build, push, and pull container images. 1. Download and install [Docker Desktop](../desktop/#download-and-install).