mirror of https://github.com/docker/docs.git
Merge pull request #22670 from sarahsanders-docker/get-started-content
get started: add troubleshooting callout
This commit is contained in:
parent
f0dda07dba
commit
45ccab3f61
|
@ -38,8 +38,15 @@ In the following image, you can see an example Docker command from Docker Hub. T
|
|||
|
||||
## Push the image
|
||||
|
||||
1. In the command line, run the `docker push` command that you see on Docker
|
||||
Hub. Note that your command will have your Docker ID, not "docker". For example, `docker push YOUR-USER-NAME/getting-started`.
|
||||
Let's try to push the image to Docker Hub.
|
||||
|
||||
1. In the command line, run the following commmand:
|
||||
|
||||
```console
|
||||
docker push docker/getting-started
|
||||
```
|
||||
|
||||
You'll see an error like this:
|
||||
|
||||
```console
|
||||
$ 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
|
||||
```
|
||||
|
||||
Why did it fail? The push command was looking for an image named `docker/getting-started`, but
|
||||
didn't find one. If you run `docker image ls`, you won't see one either.
|
||||
This failure is expected because the image isn't tagged correctly yet.
|
||||
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.
|
||||
|
||||
```console
|
||||
|
|
Loading…
Reference in New Issue