abiosoft / abiosoft/colima

Issue with buildx possibly dns related

Aperta
#739 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
30.8k
Fork
613
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, go
Ambito
cli, networking
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.