abiosoft / abiosoft/colima

Issue with buildx possibly dns related

Abierto
#739 0 comentarios 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
30.8k
Forks
613
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, go
Área
cli, networking
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.