question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cant push image to local registry

See original GitHub issue

I enabled registry with mircrok8s.enable registry

then I successfully build my image with a Dockerfile. microk8s.docker build -t localhost:32000/test:1 .

But I can’t push a custom image to the local registry microk8s.docker push localhost:32000/test:1

It will stay stuck with the following message The push refers to a repository [localhost:32000/test]

Am I missing something? any ideas of what could be wrong with the registry or my setup?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:31 (10 by maintainers)

github_iconTop GitHub Comments

55reactions
cnebergcommented, Dec 3, 2018

Ok here is the reason for me localhost refers to the IPV6 version - and the command below hangs

wget http://localhost:32000/

--2018-12-03 13:59:58--  http://localhost:32000/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:32000... connected.
HTTP request sent, awaiting response...

But if I comment out the line below from my /etc/hosts

#::1 localhost ip6-localhost ip6-loopback

it works now.

5reactions
koxu1996commented, Jul 8, 2019

I dont’t like workaround with disabling IPv6 loopback and it seems there is better way:

docker build . -t 127.0.0.1:32000/myimage:1.2.3
docker push 127.0.0.1:32000/myimage:1.2.3

Notice that I used 127.0.0.1 instead of localhost.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot push image to local registry #3611 - GitHub
After upgrading from Docker for Mac 2.0.2.1 to 2.0.3.0, Docker is now unable to push images to a local registry via localhost, which...
Read more >
How to push a docker image to a private repository
Push the image to the local registry running at localhost:5000 : $ docker push localhost:5000/my-ubuntu. Remove the locally-cached images.
Read more >
Can't push image to local registry - Docker Community Forums
Can't push image to local registry ... When I run steps as in https://docs.docker.com/registry/#basic-commands I end up with HTTP status: 500 ...
Read more >
Pushing a Docker image - Amazon ECR - AWS Documentation
If your image repository doesn't exist in the registry you intend to push to yet, create it. For more information, see Creating a...
Read more >
Pushing and pulling images | Container Registry documentation
To push any local image to Container Registry using Docker or another third-party ... role can push images to gcr.io but cannot push...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found