abiosoft / abiosoft/colima

Unable to resolve hosts in /etc/hosts after upgrade

Ouverte
#1,200 5 commentaires 8 réactions 0 personnes assignées Voir sur GitHub
regression
Langage dominant
Go
Étoiles
30.8k
Forks
613
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Description

In Colima version 0.6.8 a container could resolve hosts defined in the host /etc/hosts

After upgrading to 0.8.0 this behaviour disappears. I'm not sure from which version this changes.

`colima delete` did not resolve the issue

### Version

colima version 0.8.0
git commit: 9c08cff339f087c0600d9d56af7b5fbcfe02e287

runtime: docker
arch: x86_64
client: v24.0.6
server: v27.3.1
limactl version 1.0.1
qemu-img version 9.1.1
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [X] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

INFO[0000] colima is running using QEMU
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: 9p
INFO[0000] socket: unix:///Users/david.tourino/.colima/default/docker.sock

### Reproduction Steps

1. Add a host on /etc/hosts like
`127.0.0.1 tests-hosts.test`
2. Start colima with `colima start`
3. Run a curl from a container `docker run alpine/curl tests-hosts.test`
4. Output says it can't resolve host
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: tests-hosts.test

### Expected behaviour

Host is resolved, like in previous versions

### Additional context

The Macbook is the M1 PRO, several colleagues face the same issue.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

The issue is about host resolution from containers after a Colima upgrade. Start by examining the networking setup in Colima's source, particularly how /etc/hosts is mounted or resolved. Look at the changes between versions 0.6.8 and 0.8.0 in the codebase. Test with a minimal container to verify the behavior and check the Lima configuration Colima uses. 'Done' means containers can resolve hosts defined in the host's /etc/hosts.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
docker, go, macos
Domaine
cli, networking
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.