Replies: 1 comment 6 replies
-
Hi @MShekow , thanks for starting this discussion! So let's see if I understand your setup correctly: Docker for Windows -> Now you want to push an image to the k3d managed registry from within that
I'm not 100% sure here... but this looks more like the lookup of the name is failing, right?
This may be getting you somewhere: the registry does not run with HTTPS, but docker expects (and wants https). |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm wondering how you use k3d in a CI setup. Here it is common that you build your own images first, and then they need to be accessible from within the cluster. I'd like to use the local registry for this (
k3d cluster create mycluster --registry-create
).However, I have not found a way to even push the images into the local registry. I'm currently still experimenting on Windows (Docker for Windows), I hope that this is not the issue here.
On the host, I'm running
docker run --rm -it --name mycontainer -v "//var/run/docker.sock:/var/run/docker.sock" myimage /myscript.sh
Inside the
mycontainer
container, I create the k3d cluster (k3d cluster create mycluster --registry-create
) and then I attempt to push images into its local registry. However, both approaches I tried don't seem to work:Approach 1) run
docker network connect k3d-mycluster mycontainer
(as otherwisek3d-mycluster-registry
would not even be resolvable), then retag the image, e.g.docker tag myimage:latest k3d-mycluster-registry:5000/myimage:latest
and then try to push it:docker push k3d-mycluster-registry:5000/myimage:latest
Returned error:
Get https://k3d-mycluster-registry:5000/v2/: dial tcp: lookup k3d-mycluster-registry on 192.168.65.5:53: read udp 192.168.65.4:43967-\u003e192.168.65.5:53: i/o timeout
Approach 2) use the gateway IP (and the host port): for this I determine the Gateway IP of
mycontainer
and then I run something likedocker tag myimage:latest <gateway-ip>:34567/myimage:latest
(where34567
is the registry's port on the host). The correspondingdocker push
command then fails with this error:Get https://<gateway-ip>:34567/v2/: http: server gave HTTP response to HTTPS client
I'm not sure how to continue.
Beta Was this translation helpful? Give feedback.
All reactions