terraform-provider-docker
                                
                                 terraform-provider-docker copied to clipboard
                                
                                    terraform-provider-docker copied to clipboard
                            
                            
                            
                        mDNS (registry) names cannot currently be used on mac with the official binary (eg: consider enabling CGO)
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and docker Provider) Version
Terraform v0.13.5
Docker provider 2.9.0
Problem description
The official mac binary is apparently cross-compiled from linux, and explicitly disables CGO (https://github.com/kreuzwerker/terraform-provider-docker/blob/master/scripts/compile.sh#L16)
There are many issues with macOS and the go resolver (one of them being: https://github.com/golang/go/issues/12524 )
This is mostly a problem when using mDNS.
A good example (which is my exact problem) is that my local registry lives on registry.local (and this name is broadcasted using mDNS).
Generally, IMHO, CGO should be enabled on mac. For example, the brew formula for terraform itself does enable CGO.
Expected Behaviour
Docker image located on an mDNS registry should work just fine.
Actual Behaviour
Does not work.
Go native resolver just faceplants:
Error: Got error when attempting to fetch image version from registry: Error during registry request: Get "https://registry.local/v2/dubodubonduponey/homekit-alsa/manifests/latest": dial tcp: lookup registry.local on 10.0.4.127:53: no such host
Important factoids
I'm not sure whether a similar problem would exist on linux (I suspect so). eg: assuming you have avahi installed, I'm not sure the go resolver would pick that up.
Steps to Reproduce
- setup a local registry
- broadcast "registry.local" over mDNS
- verify curl https://registry.local/v2works fine
- this does not work with the provider
I thought I would just confirm that I'm running the provider built from 2.9.0 with CGO_ENABLED=1 and that it (obviously) work as it should as far as mDNS is concerned.
Thanks for pointing out. I guess we could easily fix this by passing the CGO_ENABLED=1 to goreleaser
This issue is stale because it has been open 60 days with no activity.
Remove stale label or comment or this will be closed in 7 days.
If you don't want this issue to be closed, please set the label pinned.
Still an issue - should be reopened.
This issue is stale because it has been open 60 days with no activity.
Remove stale label or comment or this will be closed in 7 days.
If you don't want this issue to be closed, please set the label pinned.
Still an issue, bot.
@dubo-dubon-duponey I know it has been a while, sorry for that. Before I get into trying to reproduce that problem: I assume it is still an issue?
@AntonioMeireles and @mg6 you both liked the initial bug report. Can you confirm that this is still an issue? Otherwise I will close this ticket :)
Hi. I've tried a different approach instead (#113) but to no success so far.