some-sandwich-85435
11/09/2022, 6:02 PM{
"insecure-registries": [
"mylocalhost:5000"
]
}
but I can't find the file.handsome-jewelry-53515
11/09/2022, 6:32 PMsome-sandwich-85435
11/09/2022, 6:39 PM127.0.0.1 localhost dockerlocal
to /etc/localhost
but still get
dial tcp 127.0.0.1:5000: connect: connection refused
"<https://dockerlocal:5000/v2/base/manifests/latest>": dial tcp 127.0.0.1:5000: connect: connection refused
cat ~/.docker/config.json
{
"auths": {
"<http://registry.gitlab.com|registry.gitlab.com>": {}
},
"credsStore": "osxkeychain",
"currentContext": "rancher-desktop",
"insecure-registries" : ["dockerlocal::5000"]
}
and restarted the rancher-desktop app.quick-keyboard-83126
11/09/2022, 6:46 PMsome-sandwich-85435
11/09/2022, 6:52 PMproud-jewelry-46860
11/09/2022, 9:13 PMrdctl shell
. You can get root in the VM (on mac&Linux) via sudo
. (On Windows, there are no non-root users IIRC.)some-sandwich-85435
11/09/2022, 9:24 PMquick-keyboard-83126
11/09/2022, 9:26 PMrdctl
as a way to do things to the VM including rdctl shell
to get into it.$ LIMA_HOME="$HOME/Library/Application Support/rancher-desktop/lima" "/Applications/Rancher <http://Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl|Desktop.app/Contents/Resources/resources/darwin/lima/bin/limactl>" shell 0
lima-rancher-desktop:~# tail -1 /etc/conf.d/docker
DOCKER_OPTS="--insecure-registry=insecure.home:80"
The equivalent would be:
$ rdctl shell
lima-rancher-desktop:~# tail -1 /etc/conf.d/docker
DOCKER_OPTS="--insecure-registry=insecure.home:80"
But, that's them showing where the file is and what it has, you'd have to put the content you want into that file yourself.some-sandwich-85435
11/09/2022, 9:52 PMtail -1 /etc/conf.d/docker
DOCKER_OPTS="--insecure-registry=127.0.0.1:5000 --insecure-registry=dockerlocal:5000 --insecure-registry=0.0.0.0:5000"
ERROR: failed to solve: failed to do request: Head "<http://localhost:5000/v2/adoc/devel/blobs/sha256:a71b912bc701e8b0973e75bbcd6acc9640ba82173c61c990f10dbed58a470ddf>": dial tcp 127.0.0.1:5000: connect: connection refused
ERROR: failed to solve: localhost:5000/adoc/base:local: failed to do request: Head "<http://localhost:5000/v2/adoc/base/manifests/local>": dial tcp 127.0.0.1:5000: connect: connection refused
quick-keyboard-83126
11/09/2022, 10:09 PMproud-jewelry-46860
11/09/2022, 11:00 PMhost.rancher-desktop.internal
is an alias for the (macOS) machine you're running things on; that might be helpful. (I think that ends up being the SLIRP interface, so it might actually work with services listening on loopback?)some-sandwich-85435
11/10/2022, 6:48 AMdocker run -p 5000:5000 --name registry registry:latest
and you should be able to push images to localhost:5000
dockerlocal is just an alias name in the etc/hosts, since I found that as a possible solution in the internet
the registry is running, when started with a password, I can do a docker login dockerlocal:5000
, but I can not push to itquick-keyboard-83126
11/10/2022, 1:32 PMsome-sandwich-85435
11/10/2022, 1:35 PMquick-keyboard-83126
11/10/2022, 1:36 PMsome-sandwich-85435
11/10/2022, 1:37 PMdocker login dockerlocal:5000
workedquick-keyboard-83126
11/10/2022, 1:38 PMsome-sandwich-85435
11/10/2022, 2:11 PMhost.rancher-desktop.internal
into my /etc/host and then add it to the insecure registries, and restart the app
but hostname
in the VM says lima-rancher-desktop
....
I have slightly the feeling that the problem might be a different one , but can give it a try when I have the timequick-keyboard-83126
11/10/2022, 2:11 PMsome-sandwich-85435
11/10/2022, 2:15 PMlocalhost.rancher-desktop.internal
, or my alias dockerlocal.rancher-desktop.internal
,
and add that to etc/host and to the insecure registry?quick-keyboard-83126
11/10/2022, 2:16 PMhost.rancher-desktop.internal
some-sandwich-85435
11/10/2022, 2:16 PMquick-keyboard-83126
11/10/2022, 2:16 PMtail -1 /etc/conf.d/docker
DOCKER_OPTS="--insecure-registry=127.0.0.1:5000 --insecure-registry=dockerlocal:5000 --insecure-registry=0.0.0.0:5000"
One of those entries should have the string above.some-sandwich-85435
11/10/2022, 2:18 PMERROR: failed to solve: failed to do request: Head "<https://host.rancher-desktop.internal:5000/v2/adoc/base/blobs/sha256:3ca727e3675ca83dc9580deacf077129f2ffe71a198e9fe1820c962a39c2e0db>": net/http: TLS handshake timeout
[+] Building 10.3s (30/30) FINISHED
DOCKER_OPTS="--insecure-registry=host.rancher-desktop.internal:5000 --insecure-registry=localhost:5000 --insecure-registry=127.0.0.1:5000 --insecure-registry=dockerlocal:5000 --insecure-registry=0.0.0.0:5000"
quick-keyboard-83126
11/10/2022, 2:23 PMhttps
some-sandwich-85435
11/10/2022, 2:23 PMquick-keyboard-83126
11/10/2022, 2:24 PMsome-sandwich-85435
11/10/2022, 2:24 PMquick-keyboard-83126
11/10/2022, 2:25 PMsome-sandwich-85435
11/10/2022, 2:26 PM