Merge pull request #22670 from sarahsanders-docker/get-started-content

get started: add troubleshooting callout
This commit is contained in:
Sarah Sanders 2025-05-20 12:43:33 -04:00 committed by GitHub
parent f0dda07dba
commit 45ccab3f61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 6 deletions

View File

@ -38,8 +38,15 @@ In the following image, you can see an example Docker command from Docker Hub. T
## Push the image ## Push the image
1. In the command line, run the `docker push` command that you see on Docker Let's try to push the image to Docker Hub.
Hub. Note that your command will have your Docker ID, not "docker". For example, `docker push YOUR-USER-NAME/getting-started`.
1. In the command line, run the following commmand:
```console
docker push docker/getting-started
```
You'll see an error like this:
```console ```console
$ docker push docker/getting-started $ docker push docker/getting-started
@ -47,13 +54,17 @@ In the following image, you can see an example Docker command from Docker Hub. T
An image does not exist locally with the tag: docker/getting-started An image does not exist locally with the tag: docker/getting-started
``` ```
Why did it fail? The push command was looking for an image named `docker/getting-started`, but This failure is expected because the image isn't tagged correctly yet.
didn't find one. If you run `docker image ls`, you won't see one either. Docker is looking for an image name `docker/getting started`, but your
local image is still named `getting-started`.
To fix this, you need to tag your existing image you've built to give it another name. You can confirm this by running:
2. Sign in to Docker Hub using the command `docker login -u YOUR-USER-NAME`. ```console
docker image ls
```
2. To fix this, first sign in to Docker Hub using your Docker ID: `docker login YOUR-USER-NAME`.
3. Use the `docker tag` command to give the `getting-started` image a new name. Replace `YOUR-USER-NAME` with your Docker ID. 3. Use the `docker tag` command to give the `getting-started` image a new name. Replace `YOUR-USER-NAME` with your Docker ID.
```console ```console