-
-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port forwarding does not work when using docker swarm #135
Comments
What is the default behaviour on Docker for Mac? I noticed that the ports are not yet exposed when I checked version: '3.7'
services:
test:
image: nginx:1.21.5-alpine
ports:
- target: 80
published: 80
mode: host |
It would work and curl would give me the response from nginx
Interesting, but I try to migrate from Docker Desktop to Colima, hoping to have the same behavior. Everything else I tested works like a charm, just this issue is not solvable for me without changing my previous working configuration files. Is it possible to achieve get the curl response without changing the yaml/client side? |
Furthermore, if you ssh into the colima vm ( |
Whilst this works for replicas=1, it doesn't for multiple replicas, the error being |
Kindly install the current development version with The containers should be reachable via the VM's IP address. |
Hi, I got the same issue while running and trying to connect to traefik within docker swarm.
Regards, |
@root360-AndreasUlm as a workaround, you can start colima with reachable IP address. i.e. It seems the overlay network used in swarm is blocking requests not originated from localhost. |
Port forwarding works well when running containers. However, when using a stack in docker swarm, I cannot access it from my Mac.
To reproduce, here is the YAML (test.yml) file:
To initialize a docker swarm I use
docker swarm init
. Afterwards, I create the stack withdocker stack deploy -c test.yml teststack1
If I run
curl http://localhost
it does not fail to connect, but is stuck after initial connection.This was tested with a fresh install today (
brew install colima
) and no custom settings.Edit: YAML code highlighting
The text was updated successfully, but these errors were encountered: