Issue with buildx possibly dns related
- Langage dominant
- Go
- Étoiles
- 30.8k
- Forks
- 613
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### Description
I have a somewhat complicated dns setup on my machine, in order to work around https://github.com/lima-vm/lima/issues/1333 I specify `--dns 127.0.0.1` on the cli when starting colima. This has worked for most things so far but I just stumbled into an error.
When I try to build using buildx, docker fails to fetch metadata from the registry.
### Version
Colima Version: 0.5.5
Lima Version: 0.16.0
Qemu Version: 8.0.2
all from homebrew
### Operating System
- [ ] macOS Intel <= 12 (Monterrey)
- [X] macOS Intel >= 13 (Ventura)
- [ ] macOS M1 <= 12 (Monterrey)
- [ ] macOS M1 >= 13 (Ventura)
- [ ] Linux
### Output of `colima status`
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/camdennarzt/.colima/default/docker.sock
### Reproduction Steps
1. `colima start --mount-type virtiofs --vm-type vz --memory 4 --dns 127.0.0.1 --ssh-config=false`
2. git clone https://github.com/phusion/passenger-docker
3. cd passenger-docker
4. make build_ruby32
The same happens with the dns set to 10.9.8.42 which is my computer's ip on the local network.
DNS works in running containers, and to pull images from the registry manually.
### Expected behaviour
the build should start
### Additional context
output from `docker buildx build --progress=plain --platform linux/amd64 -t phusion/passenger-base:current-amd64 -f image/Dockerfile.base image --no-cache` command:
```
#1 [internal] load build definition from Dockerfile.base
#1 transferring dockerfile: 37B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/phusion/baseimage:master
#3 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/phusion/baseimage/manifests/master": dial tcp: lookup registry-1.docker.io on 127.0.0.1:53: read udp 127.0.0.1:32897->127.0.0.1:53: read: connection refused
------
> [internal] load metadata for docker.io/phusion/baseimage:master:
------
ERROR: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to do request: Head "https://registry-1.docker.io/v2/phusion/baseimage/manifests/master": dial tcp: lookup registry-1.docker.io on 127.0.0.1:53: read udp 127.0.0.1:32897->127.0.0.1:53: read: connection refused
make: *** [build_base] Error 1
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
The issue is about DNS resolution in Colima when using buildx with a custom DNS setting. Start by examining the Colima source code for DNS configuration handling, particularly around the --dns flag and how it's passed to the underlying VM (Lima). Look at the networking setup and how buildx interacts with the Docker daemon. Check if there are existing tests for DNS or networking. The goal is to understand why buildx cannot resolve registry-1.docker.io when a custom DNS is set, while other Docker operations work.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- docker, go
- Domaine
- cli, networking
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100