Running bwce in a Docker swarm: can't access published port.


I'm having troubles running bwce containers in a docker swarm.

My test container is a simple HTTP GET service that displays the current time (I've uploaded it to docker hub)

docker pull olifly/bwce-time

Running it as a standaline container works fine:

docker run -p 8080:8080 olifly/bwce-time

Running it as a docker swarm service doesn't work however:

docker service create -p 8080:8080 --with-registry-auth olifly/bwce-time

I'm unable to access the service on port 8080. The connection simply times out.

Creating a service with a nginx container works as it should:

docker service create -p 8080:80 --with-registry-auth nginx:latest


Has anyone had any success with runnintg bwce container in a docker swarm?

docker version output:

 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:41:23 2017
 OS/Arch:      linux/amd64

 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:49 2017
 OS/Arch:      linux/amd64
 Experimental: false

Best regards,









(3) Answers