Closed igoooor closed 1 year ago
Hey @igoooor ! Thanks for creating this issue! Would it be possible to share your images section so that we know what builder etc you are using?
thanks @FabianKramm I updated my initial message
Hey @igoooor! Your problem should be fixed with https://github.com/loft-sh/devspace/pull/2486, but it seems the error message comes up because DevSpace cannot find the credentials locally as this seems to be an insecure registry. So when disabling the localRegistry, is DevSpace correctly pushing to the registry?
Yes, when disabling the localRegistry, the error still shows up but DevSpace is correctly pushing to the registry. And you are also correct this is an insecure registry, so there is no credentials to be found.
I also should specify that it not only happens to me on my ARM64 Macbook M1, but also to colleagues with Fedora amd64 machines.
With DevSpace v6.2.4 the localRegistry configuration shouldn't be needed anymore and if you set createPullSecret: false
for the images the warning will also not appear anymore
many thanks @FabianKramm 🙌 I will test that new release today
I think I must be hitting some edge case here with my macOS.
The yaml I gave you is the one linux users are using (I'm the only mac user in the team).
macOS (by default at least) does not support xxx.localhost
(it won't resolve to localhost
), so I am using instead myregistry.local.gd
instead. local.gd
is a service similar to nip.ip
xip.io
and others, where all subdomains will resolve to localhost
.
Do you see something I could do?
Because now with createPullSecret: false
and localRegistry: enabled: false
it gives me this output:
info Using kube context 'k3d-localcluster'
build:nginx Rebuild image registry.local.gd:22345/platform/nginx because image config has changed
build:nginx Building image 'localhost:30944/platform/nginx:latest' with engine 'docker'
build:node Rebuild image registry.local.gd:22345/platform/node because image config has changed
build:nginx Authenticating (localhost:30944)...
build:node Building image 'localhost:30944/platform/node:latest' with engine 'docker'
build:php Rebuild image registry.local.gd:22345/platform/php because image config has changed
build:node Authenticating (localhost:30944)...
build:php Building image 'localhost:30944/platform/php:latest' with engine 'docker'
build:php Authenticating (localhost:30944)...
build_images: build images: error building image registry.local.gd:22345/platform/php:latest: Error during image registry authentication: Error response from daemon: Get "http://localhost:30944/v2/": dial tcp [::1]:30944: connect: connection refused
If I only set localRegistry: enabled: false
it will work with the following output:
info Using kube context 'k3d-localcluster'
Ensuring image pull secret for registry: registry.local.gd:22345...
Ensuring image pull secret for registry: registry.local.gd:22345...
Ensuring image pull secret for registry: registry.local.gd:22345...
build:nginx Rebuild image registry.local.gd:22345/platform/nginx because tag is missing
build:nginx Building image 'registry.local.gd:22345/platform/nginx:latest' with engine 'docker'
build:node Rebuild image registry.local.gd:22345/platform/node because tag is missing
build:nginx Authenticating (registry.local.gd:22345)...
build:node Building image 'registry.local.gd:22345/platform/node:latest' with engine 'docker'
build:php Rebuild image registry.local.gd:22345/platform/php because tag is missing
build:node Authenticating (registry.local.gd:22345)...
build:php Building image 'registry.local.gd:22345/platform/php:latest' with engine 'docker'
build:php Authenticating (registry.local.gd:22345)...
build:nginx Authentication successful (registry.local.gd:22345)
build:php Authentication successful (registry.local.gd:22345)
build:node Authentication successful (registry.local.gd:22345)
I guess this is totally acceptable right?
What happened? I have a local cluster created with
k3d
and I used the option--registry-create myregistry.localhost
to have its own registry which I can push from my local machine and that the cluster can use to pull container images. Even thoughdocker push
works fine from my local machine, when I start my devspace project I receive this output:But as I said, I can
docker push
from the same machine/environment where I start my devspace project, so I don't understand why devspace says that. Plus, if in mydevspace.yaml
file I add:it will still display the
Couldn't retrieve...
message, but it will actually correctly push to that registry.What did you expect to happen instead? I expected to not see these errors, and that it does not fallback to the localRegistry
How can we reproduce the bug? (as minimally and precisely as possible)
My devspace.yaml:
Local Environment:
Anything else we need to know?