Install docker
➜ ~ brew install docker
Make the selenoid directory
➜ ~ sudo mkdir -p /etc/selenoid
Install boot2docker
➜ ~ brew install boot2docker
Initialize and start boot2docker:
➜ ~ boot2docker init
Downloading boot2docker ISO image…
Initialization of virtual machine “boot2docker-vm” complete.
Use `boot2docker up` to start it.
Start the vm:
➜ ~ boot2docker up
…….
Waiting for VM and Docker daemon to start…
………………………ooooooooooo
Started.
Writing /Users/alinafe.matenda/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/alinafe.matenda/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/alinafe.matenda/.boot2docker/certs/boot2docker-vm/key.pem

To connect the Docker client to the Docker daemon, please set:
export DOCKER_CERT_PATH=/Users/alinafe.matenda/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
export DOCKER_HOST=tcp://192.168.59.103:2376

Or run: `eval “$(boot2docker shellinit)”`

➜ ~ export DOCKER_CERT_PATH=/Users/alinafe.matenda/.boot2docker/certs/boot2docker-vm
➜ ~ export DOCKER_TLS_VERIFY=1
➜ ~ export DOCKER_HOST=tcp://192.168.59.104:2376

Get docker info:
➜ ~ docker info
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 4
Server Version: 17.05.0-ce

Create Selenoid configuration directory and generate configuration file:

➜ ~ docker run –rm -v /var/run/docker.sock:/var/run/docker.sock \
aerokube/cm:1.0.0 selenoid –last-versions 2 –tmpfs 128 –pull \
> /etc/selenoid/browsers.json
Unable to find image ‘aerokube/cm:1.0.0’ locally
1.0.0: Pulling from aerokube/cm
627beaf3eaaf: Pulling fs layer
……….
2017/05/21 22:26:52 Digest: sha256:b68d87220ef128ea2c3096a28c0c93c7ff6e7fa01a279bf1770dfe7e0318bddc: 22da51704708
2017/05/21 22:26:52 Status: Downloaded newer image for selenoid/opera:44.0: 22da51704708

Start Selenoid:
➜ ~ docker run -d –name selenoid -p 4444:4444 \
-v /etc/selenoid:/etc/selenoid:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
aerokube/selenoid:1.1.1
zsh: correct ‘/etc/selenoid:/etc/selenoid:ro’ to ‘/etc/selenoid/etc/selenoid:ro’ [nyae]? n
Unable to find image ‘aerokube/selenoid:1.1.1’ locally
1.1.1: Pulling from aerokube/selenoid
627beaf3eaaf: Already exists
2839acc7ac7f: Pull complete
deb2a3155055: Pull complete
Digest: sha256:71e63b449f9c39a23ecd9475bfd21664ba1c7a5b255d746480e225c9ac024211
Status: Downloaded newer image for aerokube/selenoid:1.1.1
463a4461840ac12ba28024d8af18430a27b81b8d1645ae5d0b9eb234ca2e0201
➜ ~
Start an additional lightweight container with Selenoid UI.
➜ ~ docker run -d –name selenoid-ui –net host \
aerokube/selenoid-ui:1.0.0
Unable to find image ‘aerokube/selenoid-ui:1.0.0’ locally
1.0.0: Pulling from aerokube/selenoid-ui
ddc31c6e9fbb: Pull complete
Digest: sha256:0faf5a4d214a1cdd5687af72dd6faef2a36d91e1300e6187a81de7ea6569777a
Status: Downloaded newer image for aerokube/selenoid-ui:1.0.0
e92128af2f2e783771b14f5beb97b34a2cf3a42f5287ea134fe02f220407220b

Open UI in browser at http://192.168.59.104:8080/:

Screen Shot 2017-05-21 at 15.32.22

update browsers:
docker run –rm -v /var/run/docker.sock:/var/run/docker.sock \
aerokube/cm:1.0.0 selenoid –last-versions 2 –tmpfs 128 –pull \
> /etc/selenoid/browsers.json

reload Selenoid configuration:
➜ ~ docker kill -s HUP selenoid

Advertisements