-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Build and push to an insecure registry completes unsuccessfully #1732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@NicklasWallgren i am new to the project and want to understand if this use case was supported in the previous versions of |
I'm not sure really. I have tried versions 0.20 and 0.24. I thought it would work out-of-the-box since both I'm using a simple |
ok. Thanks. @balopat might have better idea. |
I hit this too with Jib trying to push to a registry hosted within the cluster with k3s.io. #1705 hit the same issue with Kaniko. |
@NicklasWallgren thanks for the issue and @briandealwis thanks for linking the other issue. this is happening because of the way we retrieve the remote image reference once we've pushed an image with skaffold to retrieve the remote digest: since we're not telling go-containerregistry that our registry is insecure, it assumes it's not and defaults to https, which fails. the quick and easy fix to this would be to tell skaffold that we're insecure before it tries to retrieve the remote image reference, but I'm not a fan of requiring the user to tell skaffold that their registry is insecure (through a flag or skaffold.yaml option or something else). I'm looking into ways we might be able to infer that without having to explicitly pass it in as a flag or option: maybe reading the summoning @jonjohnsonjr, maybe you have a better idea? |
There are some heuristics for matching insecure registries based on hostname and IP. If you can control the registry name, you can signal to go-containerregistry that you want it to be insecure by using the PRs welcome 😄 |
Jib currently requires the user to explicitly allow using insecure registries (non-https). It looks like the dockerd defaults to allowing insecure registries only for 127.0.0.0/8:
|
@balopat Can we reopen this issue, since the PR was reverted? |
@NicklasWallgren got the fix merged today. we'll be releasing it tomorrow, but if you want to build from master and try it out let us know! |
@nkubala Works great, thanks :) |
This issue has reappeared in v0.36.0+
|
Expected behavior
A Skaffold driven build should complete successfully even if the image is pushed to an insecure registry.
Actual behavior
Skaffold errors on building/pushing the new image.
Works fine using jib directly.
Information
Skaffold version: 0.24
~/.docker/deamon.json
The text was updated successfully, but these errors were encountered: