abiosoft / colima

Container runtimes on macOS (and Linux) with minimal setup
MIT License
18.65k stars 380 forks source link

Colima not inheriting system DNS - cannot docker login or pull #711

Open henricook opened 1 year ago

henricook commented 1 year ago

Description

Starting in the last couple of months three different members of our team have reported an issue with new Colima installs. The Colima VM has a /etc/resolv.conf that contains 192.168.107.1. This address can't resolve anything, on the public internet or on our VPN.

The error they encountered when trying to docker login or docker pull was:

Error response from daemon: Get "https://path.to.our.registry.mycompany.com/v2/": dial tcp: lookup path.to.our.registry.mycompany.com on 192.168.107.1:53: read udp 192.168.107.2:60249->192.168.107.1:53: i/o timeout

To (poorly) workaround the issue we had to use:

colima delete && start --dns 8.8.8.8 --dns 172.100.100.100 (where the last address is our internal DNS server for use on our VPN)

This can be added to the config file for persistence between reboots but if any of these server addresses change, or a user isn't connected to our VPN it can degrade performance.

Previously Colima picked up the system DNS, but this appears to be broken - does anyone have more information/is a fix visible?

Team members with this issue are running Colima 0.5.4

Version

Colima Version: 0.5.4 Lima Version: 0.15.1 Qemu Version: 8.0.0

Operating System

Output of colima status

INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/faithho/.colima/default/docker.sock

Reproduction Steps

  1. On a brand new machine: Follow the install guide: https://github.com/abiosoft/colima#installation
  2. colima start
  3. Try and docker pull anything

Expected behaviour

No response

Additional context

No response

rfay commented 1 year ago

Related:

xuwhite commented 1 month ago

I have the same issue using VZ running on macbook air M1 >= 13 (Ventura) Colima Version: 0.7.0 Lima Version 0.22.0

colima status
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.107.2
INFO[0000] socket: unix:///Users/xu/.colima/default/docker.sock

the workaround results in having to restart colima everytime the network changed e.g. changing from wifi to mobile hotspot