abiosoft / colima

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

Problem with port binding #1140

Open julian-ladjani opened 1 month ago

julian-ladjani commented 1 month ago

Description

Hello, I use colima since yesterday, I have a dns container working perfectly with docker, since I use colima, Ihave this problem: docker: Error response from daemon: driver failed programming external connectivity on endpoint nice_bell (b688f5012ab945b7d85e4f85a1ead26960501561deb75c417db4333e27b85db7): failed to bind port 0.0.0.0:53/tcp: Error starting userland proxy: listen tcp4 0.0.0.0:53: bind: address already in use. (same with udp), When I use 54 port (for exemple), it work fine. Maybe it's a permissions problem or something like that?

Version

colima version 0.7.5 git commit: 1588c066b9ab9dae8205ef265929c7eb43dca473

runtime: docker arch: aarch64 client: v27.2.1 server: v27.1.1 limactl version 0.23.2 qemu-img version 9.1.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/julian/.colima/default/docker.sock

Reproduction Steps

  1. docker run -p 53:53 -it --rm alpine ash

Expected behaviour

same as docker run -p 54:54 -it --rm alpine ash

Additional context

No response

abiosoft commented 1 month ago

It simply means something is already using port 53.

You can check the program using it by running the following command.

lsof -nP -iTCP:53 | grep LISTEN
julian-ladjani commented 1 month ago

I tested with netcat before in addition to lsof (by listening to port 53 directly). Since we did not find a solution, we installed a dnsmasq and it works perfectly but not with docker-compose with colima (works with docker desktop).

I tried with two macs, it gives the same result