Skip to content

get started: add troubleshooting callout #22670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions content/get-started/workshop/04_sharing_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,33 @@

## 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:

Check failure on line 43 in content/get-started/workshop/04_sharing_app.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'commmand'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'commmand'?", "location": {"path": "content/get-started/workshop/04_sharing_app.md", "range": {"start": {"line": 43, "column": 43}}}, "severity": "ERROR"}

```console
docker push docker/getting-started
```

You'll see an error like this:

```console
$ docker push docker/getting-started
The push refers to repository [docker.io/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
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
Expand Down