colima icon indicating copy to clipboard operation
colima copied to clipboard

Help forwarding ports from docker-compose

Open jvzaniolo opened this issue 3 years ago • 4 comments

Hey,

I have this docker-compose

version: "2"
services:
  frontend:
    ports:
     - "80:80"
     - "443:443"
    extra_hosts:
    - "dev.frontend.com:${HOSTIP}"

I can build the container just fine with Colima but the connection is not working It does work with the Docker desktop app

jvzaniolo avatar Apr 07 '22 19:04 jvzaniolo

Running docker ps outside Colima's VM

CONTAINER ID   IMAGE       COMMAND              CREATED          STATUS         PORTS                                                                      NAMES
9787418c3675   httpd:2.4   "httpd-foreground"   22 minutes ago   Up 3 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   docker-frontend-1

jvzaniolo avatar Apr 07 '22 19:04 jvzaniolo

what version are you running? colima version is anything else running on ports 80 and 443?

abiosoft avatar Apr 08 '22 20:04 abiosoft

Hey, it seems to be working now. I deleted the ~/.docker folder and it started working again.

But colima is at 0.3.4 and nothing else is running on ports 80 or 443

jvzaniolo avatar Apr 08 '22 21:04 jvzaniolo

I don't want to open a whole nother bug I already know the answer to. I'll tac on here to "general network issues" unless that's frowned on.

https://github.com/lima-vm/lima/issues/366

I can say that I forwarded udp, but it doesn't seem to work, and I think this is why.

rlewkowicz avatar Aug 22 '22 20:08 rlewkowicz