1. Quick Start Guide
1.1. When you have Docker
-
If you know exact uri of selenoid - just specify it with
--selenoid-uri
. No matter this is the same host or not.$ docker run -d --name selenoid-ui -p 8080:8080 aerokube/selenoid-ui --selenoid-uri http://${SELENOID_HOST}:4444
It can’t be localhost
or127.0.0.1
until the UI is started in the same container as selenoid. -
When the UI and Selenoid on the same host you need to determine selenoid uri accessible from UI container. Usually it can be the docker gateway address.
-
If you use default network mode, firstly
$ DOCKER_GATEWAY_ADDR=`docker inspect selenoid -f {{.NetworkSettings.Gateway}}` $ echo $DOCKER_GATEWAY_ADDR 172.17.0.1 (1)
1 May be different For MacOS you should determine interface with help of netstat. Remember that gateway address and host address is not the same in this case. -
Then run Selenoid UI
$ docker run -d --name selenoid-ui -p 8080:8080 aerokube/selenoid-ui --selenoid-uri http://${DOCKER_GATEWAY_ADDR}:4444
-
-
On the same host you can just link with selenoid container:
-
Assumed you have
selenoid
container already up and running$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES fc479233071d aerokube/selenoid "/usr/bin/selenoid..." 10 minutes ago Up 10 minutes 0.0.0.0:4444->4444/tcp selenoid
-
Just run linked UI:
$ docker run -d \ --name selenoid-ui \ --link selenoid \ (1) -p 8080:8080 \ aerokube/selenoid-ui --selenoid-uri=http://selenoid:4444 (2)
1 selenoid
is name of Selenoid container2 should be the same as link name UI will think that http://selenoid:4444
is real address of selenoid. But it’s true only inside of UI container.
-
1.2. With Docker Compose
With docker compose remember to use the same network with selenoid and browser containers. For now this is only bridge
network mode.
version: '3'
services:
selenoid:
image: "aerokube/selenoid"
network_mode: bridge
ports:
- "4444:4444"
volumes:
- "$PWD:/etc/selenoid/" # assumed current dir contains browsers.json
- "/var/run/docker.sock:/var/run/docker.sock"
selenoid-ui:
image: "aerokube/selenoid-ui"
network_mode: bridge
links:
- selenoid
ports:
- "8080:8080"
command: ["--selenoid-uri", "http://selenoid:4444"]
1.3. When you don’t have Docker
-
Download Selenoid UI binary from releases page.
-
Start it:
$ ./selenoid-ui --selenoid-uri http://<selenoid-host-or-ip>:4444
2. Features list:
2.1. Stats
Shows current quota usage, pending browsers and queue. Gets updates via SSE, so no need to refresh browser to see what happens.
2.2. Capabilities
You can choose browser from the available browser list and UI will provide an example of setup with right capabilities. Examples available for several languages.
2.3. VNC
If you get browser from selenoid with enableVNC=true
capability, you can see list of available screens:
VNC allows to see and interact with browser:
Please refer to selenoid documentation about VNC usage.
3. Contributing & Development
1) Ensure you have yarn and go-bindata-assetfs installed
-
Get deps with
go get -u github.com/kardianos/govendor && govendor sync
2) Generate static resources:
$ go generate ./web ./...
3) Build:
$ go build
4) To build Docker container type:
$ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build
$ docker build -t selenoid-ui:latest .