You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the docker on macOS instructions exactly for setting up a registry with minikube does not work. When trying to run docker push with my newly tagged image, I always encounter Get "http://localhost:5000/v2/": EOF.
The instructions in the docs say "Note: Minikube will generate a port and request you use that port when enabling registry. That instruction is not related to this guide." So I assume I will not use the port that was allocated for me in the subsequent commands and use port 5000. I run docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000"
In another terminal I run docker tag <my image>:latest localhost:5000/my_image, docker push localhost:5000/my_image
The error that is returned is Get "http://localhost:5000/v2/": EOF
The socat container log says 2024/10/16 22:57:07 socat[11] E connect(5, AF=2 192.168.49.2:5000, 16): Connection refused where 192.168.49.2 is the minikube ip.
The only way I've been able to push any image to any registry is to manually start the registry on a node:
minikube ssh
docker run --restart=always -d -p 5000:5000 --name registry registry:2
I can then see within the minikube node via docker ps -a that the new container exists with ports 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp
A small difference though, I use minikube with the docker driver, so in this case the registry uses another port, as noted at minikube start:
Registry addon with docker driver uses port 51132 please use that instead of default port 5000
Now, for me at least, when minikube starts up, the port mapping 51132:5000 will be automatically created, so I can use `curl http://localhost:51132/v2/" to get an empty json, as expected.
However, this still doesn't work with docker push, and the reason I found behind that is that it tries to use IPv6.
What Happened?
Following the docker on macOS instructions exactly for setting up a registry with minikube does not work. When trying to run
docker push
with my newly tagged image, I always encounterGet "http://localhost:5000/v2/": EOF
.Here are the steps I run (after
minikube delete
):minikube start --cni='cilium' --memory='no-limit' --cpus='no-limit' --nodes=2 --insecure-registry "10.0.0.0/24"
minikube addons enable registry
docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000"
docker tag <my image>:latest localhost:5000/my_image
,docker push localhost:5000/my_image
Get "http://localhost:5000/v2/": EOF
2024/10/16 22:57:07 socat[11] E connect(5, AF=2 192.168.49.2:5000, 16): Connection refused
where192.168.49.2
is the minikube ip.The only way I've been able to push any image to any registry is to manually start the registry on a node:
minikube ssh
docker run --restart=always -d -p 5000:5000 --name registry registry:2
docker ps -a
that the new container exists with ports0.0.0.0:5000->5000/tcp, :::5000->5000/tcp
docker run --rm -it --network=host alpine ash -c "apk add socat && socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000"
docker push localhost:5000/my_image
Maybe obviously, though, that image will only be available on my control-plane node and not the other one.
Attach the log file
log.txt
Operating System
macOS (Default) arm64
Driver
Docker
The text was updated successfully, but these errors were encountered: