Docker Community Forums

Share and learn in the Docker community.

How to get multiple service ports opened in docker swarm for multiple docker selenium-node-containers()


(Sreenivasulu Kurunchetty) #1

Hi guys,

I am trying to create a grid with 2 nodes (Workers ) and 1 HUB(manager). Am able to successfully create grid, but the problem is , am getting only 1 service port opened for multiple continers(say 4). I want to see my execution in selenium-chrome-node-debug through VNC viewer, but am getting only 1 service port for multiple containers. Tried with Mode:host also but no use, Compose version 3.3.

My questio is how to get Unique service port to Each docker container?

version: “3.3”
services:
hub:
image: selenium/hub:2.53.1
ports:
- “80:4444”
networks:
- GridNetwork
deploy:
mode: replicated
replicas: 1
labels:
selenium.grid.type: “hub”
selenium.grid.hub: “true”
restart_policy:
condition: none
placement:
constraints: [node.role == manager]

chrome:
image: selenium/node-chrome-debug
entrypoint: bash -c ‘SE_OPTS="-host $$HOSTNAME"; /opt/bin/entry_point.sh’
volumes:
- /dev/shm:/dev/shm
depends_on:
- hub
networks:
- GridNetwork
ports:
- “:5900”
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
- REMOTE_HOST=http://$$HOSTNAME:5555
deploy:
mode: replicated
replicas: 4
labels:
selenium.grid.type: “node”
selenium.grid.node: “true”
selenium.grid.node.type: “chrome”
restart_policy:
condition: none
placement:
constraints: [node.role == worker]

networks:
GridNetwork:
external: false


(Promode96) #2

Any update here ?

We have similar issue, We have docker swarm with debug-chrome-node images but VNC ports are impossible to connect


(Granlee) #3

I have the same question, any one has an idea on how to connect to a container replace create spawn through docker swarm?

Thanks
GLK