Skip to content

Commit

Permalink
Merge pull request #2621 from chaodaiG/fix-port
Browse files Browse the repository at this point in the history
Local registry example uses port 5001 to be more mac friendly
  • Loading branch information
BenTheElder authored Feb 5, 2022
2 parents c117f59 + bfce9c8 commit 3a6bafa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions site/content/docs/user/local-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ with it enabled.
The registry can be used like this.

1. First we'll pull an image `docker pull gcr.io/google-samples/hello-app:1.0`
2. Then we'll tag the image to use the local registry `docker tag gcr.io/google-samples/hello-app:1.0 localhost:5000/hello-app:1.0`
3. Then we'll push it to the registry `docker push localhost:5000/hello-app:1.0`
4. And now we can use the image `kubectl create deployment hello-server --image=localhost:5000/hello-app:1.0`
2. Then we'll tag the image to use the local registry `docker tag gcr.io/google-samples/hello-app:1.0 localhost:5001/hello-app:1.0`
3. Then we'll push it to the registry `docker push localhost:5001/hello-app:1.0`
4. And now we can use the image `kubectl create deployment hello-server --image=localhost:5001/hello-app:1.0`

If you build your own image and tag it like `localhost:5000/image:foo` and then use
it in kubernetes as `localhost:5000/image:foo`.
If you build your own image and tag it like `localhost:5001/image:foo` and then use
it in kubernetes as `localhost:5001/image:foo`.
2 changes: 1 addition & 1 deletion site/static/examples/kind-with-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -o errexit

# create registry container unless it already exists
reg_name='kind-registry'
reg_port='5000'
reg_port='5001'
if [ "$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)" != 'true' ]; then
docker run \
-d --restart=always -p "127.0.0.1:${reg_port}:5000" --name "${reg_name}" \
Expand Down

0 comments on commit 3a6bafa

Please sign in to comment.