docker-compose.yml file
version: '3'
services:
selenoid:
image: "aerokube/selenoid:latest"
container_name: selenoid
ports:
- "4444:4444"
networks:
- selenoid
volumes:
- ".:/etc/selenoid"
- "./target:/output"
- "/var/run/docker.sock:/var/run/docker.sock"
- "./target:/opt/selenoid/video"
environment:
- "OVERRIDE_VIDEO_OUTPUT_DIR=$PWD/target"
command: ["-conf", "/etc/selenoid/browsers.json", "-video-output-dir", "/opt/selenoid/video", "-container-network", "selenoid"]
selenoid-ui:
image: "aerokube/selenoid-ui:latest"
container_name: selenoid-ui
links:
- selenoid
ports:
- "8081:8081"
networks:
- selenoid
command: ["--selenoid-uri", "http://selenoid:4444"]
chrome_89.0:
image: "selenoid/vnc:chrome_89.0"
container_name: chrome_89.0
links:
- selenoid
- selenoid-ui
depends_on:
- selenoid
- selenoid-ui
networks:
- selenoid
volumes:
- "/dev/shm:/dev/shm"
chrome_91.0:
image: "selenoid/vnc:chrome_91.0"
container_name: chrome_91.0
links:
- selenoid
- selenoid-ui
depends_on:
- selenoid
- selenoid-ui
networks:
- selenoid
volumes:
- "/dev/shm:/dev/shm"
firefox_57.0:
image: "selenoid/vnc:firefox_57.0"
container_name: firefox_57.0
links:
- selenoid
- selenoid-ui
depends_on:
- selenoid
- selenoid-ui
networks:
- selenoid
volumes:
- "/dev/shm:/dev/shm"
firefox_83.0:
image: "selenoid/vnc:firefox_83.0"
container_name: firefox_83.0
links:
- selenoid
- selenoid-ui
depends_on:
- selenoid
- selenoid-ui
networks:
- selenoid
volumes:
- "/dev/shm:/dev/shm"
networks:
selenoid:
external:
name: selenoid
browser.json file
{
"firefox": {
"default": "57.0",
"versions": {
"57.0": {
"image": "selenoid/vnc:firefox_57.0",
"port": "4444",
"path": "/wd/hub"
}
},
"versions": {
"83.0": {
"image": "selenoid/vnc:firefox_83.0",
"port": "4444",
"path": "/wd/hub"
}
}
},
"chrome": {
"default": "latest",
"versions": {
"89.0": {
"image": "selenoid/vnc:chrome_89.0",
"port": "4444",
"path": "/"
}
},
"versions": {
"91.0": {
"image": "selenoid/vnc:chrome_91.0",
"port": "4444",
"path": "/"
}
}
}
}
Executing below commands in sequence:
- docker network create selenoid command
- docker-compose up -d command
- docker ps -a
All the containers are running up.
When I tried to launch localhost:8081 for selenoid UI, it's not working as expected.
I want to run my selenoid UI on 8081 only as 8080 port is occupied by my local Jenkins.
Please let me know if I am missing any configuration and how can I access selenoid UI on 8081 port.
Thanks.
You can change the selenoid UI port in the docker-compose service to map to port 8080 like:
Or you just change the port that it is listening like in this answer passing the parameter:
-listen :8081