Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Upgrade Firefox 43.0.1, Sauce Connect 4.3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
elgalu committed Dec 19, 2015
1 parent bfff22d commit 81bdd8d
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 43 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ Note image ids also change after scm-source.json has being updated which trigger
###### To get container versions
docker exec grid versions

## 2.48.2g (2015-12-18)
+ Upgrade Firefox to 43.0.1
+ Upgrade Chrome to 47.0.2526.106
+ Upgrade Sauce Connect to 4.3.13
+ Upgrade BrowserStack to 4.2
+ Image tag details:
+ Selenium: v2.48.2 (41bccdd)
+ Chrome stable: 47.0.2526.106
+ Firefox stable: 43.0.1
+ Chromedriver: 2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b)
+ Java: 1.8.0_66-internal OpenJDK 64-Bit 1.8.0_66-b01
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.9.1, build a34a1d5
+ FROM ubuntu:wily-20151208
+ Python: 2.7.10
+ Sauce Connect 4.3.13, build 1877 d9e5947
+ BrowserStack Local version 4.2
+ Image ID: TBD
+ Digest: sha256:TBD

## 2.48.2f (2015-12-09)
+ Upgrade Ubuntu wily from 20151019 to 20151208
+ Upgrade Chrome to 47.0.2526.80
Expand All @@ -18,7 +38,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Java: 1.8.0_66-internal OpenJDK 64-Bit 1.8.0_66-b01
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.9.1, build a34a1d5
+ FROM ubuntu:wily-20151019
+ FROM ubuntu:wily-20151208
+ Python: 2.7.10
+ Sauce Connect 4.3.12, build 1788 abd6986
+ BrowserStack Local version 4.1
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ RUN pip install --upgrade \
# Sauce Connect Tunneling #
# ------------------------#
# https://docs.saucelabs.com/reference/sauce-connect/
ENV SAUCE_CONN_VER="sc-4.3.12-linux" \
ENV SAUCE_CONN_VER="sc-4.3.13-linux" \
SAUCE_CONN_DOWN_URL="https://saucelabs.com/downloads"
RUN cd /tmp \
&& wget --no-verbose "${SAUCE_CONN_DOWN_URL}/${SAUCE_CONN_VER}.tar.gz" \
Expand Down Expand Up @@ -562,7 +562,7 @@ RUN cd /tmp \
#---------------------#
# Latest available firefox version
# this also works: ENV FIREFOX_LATEST_VERSION latest
ENV FIREFOX_VERSIONS7 "42.0"
ENV FIREFOX_VERSIONS7 "43.0.1"
RUN cd ${NORMAL_USER_HOME}/firefox-src \
&& for FF_VER in $(echo ${FIREFOX_VERSIONS7} | tr "," "\n"); do \
mozdownload --application=firefox \
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ Note SeleniumHQ/docker-selenium project is more useful for building selenium gri

In general add `sudo` only if needed in your environment and `--privileged` or `-v /dev/shm:/dev/shm` if you really need it like when [Chrome crashes](https://github.com/elgalu/docker-selenium/issues/20) during your high gpu intensive tests.

docker pull elgalu/selenium:2.48.2f
docker pull elgalu/selenium:2.48.2g

docker run --rm --name=grid -p 4444:24444 -p 5920:25900 \
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.48.2f
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.48.2g

Make sure `docker run` finishes with **selenium all done and ready for testing** else you won't be able to start your tests. To perform this check programatically please use this command where `grid` is the name of the container:

Expand Down Expand Up @@ -64,12 +64,12 @@ Supervisor exposes an http server but is not enough to bind the ports via `docke
### Screen size
You can set a custom screen size at docker run time by providing `SCREEN_WIDTH` and `SCREEN_HEIGHT` environment variables:

docker pull elgalu/selenium:2.48.2f
docker pull elgalu/selenium:2.48.2g

docker run -d --name=grid -p 4444:24444 -p 5920:25900 \
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1480 \
elgalu/selenium:2.48.2f
elgalu/selenium:2.48.2g

docker exec grid wait_all_done 10s

Expand Down Expand Up @@ -123,7 +123,7 @@ You need to pass the environment variable `-e NOVNC=true` in order to start the

docker run --rm --name=grid -p 4444:24444 -p 5920:25900 \
-p 6080:26080 -e NOVNC=true \
elgalu/selenium:2.48.2f
elgalu/selenium:2.48.2g

If the VNC password was randomly generated find out with

Expand All @@ -136,7 +136,7 @@ If the VNC password was randomly generated find out with
You can launch a grid only container via environment variables:

docker run --rm --name=hub -p 4444:24444 -p 5930:25900 \
-e CHROME=false -e FIREFOX=false elgalu/selenium:2.48.2f
-e CHROME=false -e FIREFOX=false elgalu/selenium:2.48.2g

The important part above is `-e CHROME=false -e FIREFOX=false` which tells the docker image not run run default chorme and firefox nodes turning the container into a grid-only one.

Expand All @@ -150,7 +150,7 @@ You can lunch a node only container via environment variables:
-e SELENIUM_HUB_PORT=4444 \
-e SELENIUM_NODE_HOST=docker.host \
-e GRID=false -e CHROME=true -e FIREFOX=true \
elgalu/selenium:2.48.2f
elgalu/selenium:2.48.2g

The important part above is `-e GRID=false` which tells the container to be a node-only node, this this case with 2 browsers `-e CHROME=true -e FIREFOX=true` but could be just 1.

Expand All @@ -164,7 +164,7 @@ Start the grid with Chrome and Firefox
-e SELENIUM_NODE_CH_PORT=25010 -e SELENIUM_NODE_FF_PORT=26010 \
-e GRID=true -e CHROME=true -e FIREFOX=true \
-e VNC_PASSWORD=hola -e VNC_PORT=5810 \
-v /dev/shm:/dev/shm elgalu/selenium:2.48.2f
-v /dev/shm:/dev/shm elgalu/selenium:2.48.2g

Add another docker container node with 2 more browsers:

Expand All @@ -174,7 +174,7 @@ Add another docker container node with 2 more browsers:
-e SELENIUM_NODE_CH_PORT=25020 -e SELENIUM_NODE_FF_PORT=26020 \
-e GRID=false -e CHROME=true -e FIREFOX=true \
-e VNC_PASSWORD=hola -e VNC_PORT=5820 \
-v /dev/shm:/dev/shm elgalu/selenium:2.48.2f
-v /dev/shm:/dev/shm elgalu/selenium:2.48.2g

And another

Expand All @@ -184,7 +184,7 @@ And another
-e SELENIUM_NODE_CH_PORT=25030 -e SELENIUM_NODE_FF_PORT=26030 \
-e GRID=false -e CHROME=true -e FIREFOX=true \
-e VNC_PASSWORD=hola -e VNC_PORT=5830 \
-v /dev/shm:/dev/shm elgalu/selenium:2.48.2f
-v /dev/shm:/dev/shm elgalu/selenium:2.48.2g

## Chrome crashed

Expand Down Expand Up @@ -223,9 +223,9 @@ There are also additional steps you can take to ensure you're using the correct

You can simply verify that image id is indeed the correct one.

# e.g. full image id for tag 2.48.2f
# e.g. full image id for tag 2.48.2g
export IMGID="<<Please see CHANGELOG.md>>"
if docker inspect -f='{{.Id}}' elgalu/selenium:2.48.2f |grep ${IMGID} &> /dev/null; then
if docker inspect -f='{{.Id}}' elgalu/selenium:2.48.2g |grep ${IMGID} &> /dev/null; then
echo "Image ID tested ok"
else
echo "Image ID doesn't match"
Expand All @@ -235,7 +235,7 @@ You can simply verify that image id is indeed the correct one.

Given docker.io currently allows to push the same tag image twice this represent a security concern but since docker >= 1.6.2 is possible to fetch the digest sha256 instead of the tag so you can be sure you're using the exact same docker image every time:

# e.g. sha256 for tag 2.48.2f
# e.g. sha256 for tag 2.48.2g
export SHA=<<Please see CHANGELOG.md>>
docker pull elgalu/selenium@sha256:${SHA}

Expand All @@ -261,7 +261,7 @@ Host machine, terminal 2:
docker run --rm --name=ch -p=4444:24444 \
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
elgalu/selenium:2.48.2f
elgalu/selenium:2.48.2g

Now when you run your tests instead of connecting. If docker run fails try `xhost +`

Expand All @@ -283,7 +283,7 @@ ANYPORT=0
REMOTE_DOCKER_SRV=localhost
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -p=0.0.0.0:${ANYPORT}:24444 \
-p=0.0.0.0:${ANYPORT}:25900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.48.2f
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.48.2g
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
# Useful if the docker server is running in the cloud. Establish free local ports
Expand All @@ -293,7 +293,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
# it acts as a jump host so my public key is already on that server
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -e SCREEN_HEIGHT=1110 \
-e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" \
elgalu/selenium:2.48.2f
elgalu/selenium:2.48.2g
# -- Common: Wait for the container to start
./host-scripts/wait-docker-selenium.sh grid 7s
Expand Down Expand Up @@ -364,7 +364,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
If you prefer to download the final built image from docker you can pull it, personally I always prefer to build them manually except for the base images like Ubuntu 14.04.2:
docker pull elgalu/selenium:2.48.2f
docker pull elgalu/selenium:2.48.2g
#### 2. Use this image
Expand Down
42 changes: 21 additions & 21 deletions READMELeo.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
## Build

time (docker build -t="elgalu/selenium:2.48.2f" . ;echo $?;beep)
docker run --rm -ti -m 4000M --cpu-quota=0 --name=grid -p=4444:24444 -p=5920:25900 -p=2222:22222 -e DISABLE_ROLLBACK=true -e VIDEO=true -e MEM_JAVA="1024m" -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" -v /dev/shm:/dev/shm elgalu/selenium:2.48.2f
time (docker build -t="elgalu/selenium:2.48.2g" . ;echo $?;beep)
docker run --rm -ti -m 4000M --cpu-quota=0 --name=grid -p=4444:24444 -p=5920:25900 -p=2222:22222 -e DISABLE_ROLLBACK=true -e VIDEO=true -e MEM_JAVA="1024m" -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" -v /dev/shm:/dev/shm elgalu/selenium:2.48.2g

Wait and id

docker exec grid wait_all_done 30s
docker inspect -f='{{.Id}}' elgalu/selenium:2.48.2f
docker inspect -f='{{.Id}}' elgalu/selenium:2.48.2g

Copy

docker cp grid:/home/application/chrome-deb/. binaries/

Build a grid with extra nodes

docker run --rm --name=grid -p 4444:24444 -p 5920:25900 -v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.48.2f
docker run --rm --name=grid -p 4444:24444 -p 5920:25900 -v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.48.2g

docker run --rm --name=node -e DISP_N=13 -e SSHD_PORT=22223 -e SUPERVISOR_HTTP_PORT=29003 -e VNC_PORT=25903 -e SELENIUM_NODE_CH_PORT=25330 -e SELENIUM_NODE_FF_PORT=25331 -e GRID=false -e CHROME=true -e FIREFOX=true --net=container:grid elgalu/selenium:2.48.2f
docker run --rm --name=node -e DISP_N=13 -e SSHD_PORT=22223 -e SUPERVISOR_HTTP_PORT=29003 -e VNC_PORT=25903 -e SELENIUM_NODE_CH_PORT=25330 -e SELENIUM_NODE_FF_PORT=25331 -e GRID=false -e CHROME=true -e FIREFOX=true --net=container:grid elgalu/selenium:2.48.2g

See logs

docker exec -ti grid bash -c "ls -lah /var/log/sele/"

Testing in ssh [email protected]

docker run --rm --name=grid -p=4444:24444 -p=5920:25900 -p=2222:22222 -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" -e VNC_PASSWORD=Hola3 os-registry.stups.zalan.do/tip/selenium:2.48.2f
docker run --rm --name=grid -p=4444:24444 -p=5920:25900 -p=2222:22222 -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" -e VNC_PASSWORD=Hola3 os-registry.stups.zalan.do/tip/selenium:2.48.2g

## Transfer used browser source artifacts to keep them in the cloud

Expand All @@ -47,18 +47,18 @@ List firefox versions via docker exe

## To update image id and digest

docker inspect -f='{{.Id}}' elgalu/selenium:2.48.2f
docker inspect -f='{{.Id}}' elgalu/selenium:2.48.2g
docker images --digests

## Run with shared dir

docker run --rm --name=grid -p=127.0.0.1:4460:24444 -p=127.0.0.1:5910:25900 \
-v /e2e/uploads:/e2e/uploads elgalu/selenium:2.48.2f
-v /e2e/uploads:/e2e/uploads elgalu/selenium:2.48.2g
docker run --rm --name=grid -p=4460:24444 -p=5910:25900 \
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:2.48.2f
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:2.48.2g


docker run --rm --name=ff -p=127.0.0.1:4461:24444 -p=127.0.0.1:5911:25900 -v /e2e/uploads:/e2e/uploads elgalu/selenium:2.48.2f
docker run --rm --name=ff -p=127.0.0.1:4461:24444 -p=127.0.0.1:5911:25900 -v /e2e/uploads:/e2e/uploads elgalu/selenium:2.48.2g

## Run without shared dir and bind ports to all network interfaces

Expand All @@ -81,11 +81,11 @@ List firefox versions via docker exe
## Run without dir and bind to all interfaces
Note anything after the image will be taken as arguments for the cmd/entrypoint

docker run --rm --name=grid -p=0.0.0.0:8813:8484 -p=0.0.0.0:2222:2222 -p=0.0.0.0:4470:24444 -p=0.0.0.0:5920:25900 -e SCREEN_WIDTH=1800 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.48.2f
docker run --rm --name=grid -p=0.0.0.0:8813:8484 -p=0.0.0.0:2222:2222 -p=0.0.0.0:4470:24444 -p=0.0.0.0:5920:25900 -e SCREEN_WIDTH=1800 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.48.2g

docker run --rm --name=grid -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola elgalu/selenium:2.48.2f
docker run --rm --name=grid -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:2.48.2f
docker run --rm --name=grid -p=0.0.0.0:4470:24444 -p=0.0.0.0:5920:25900 --add-host myserver.dev:172.17.42.1 elgalu/selenium:2.48.2f
docker run --rm --name=grid -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola elgalu/selenium:2.48.2g
docker run --rm --name=grid -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:2.48.2g
docker run --rm --name=grid -p=0.0.0.0:4470:24444 -p=0.0.0.0:5920:25900 --add-host myserver.dev:172.17.42.1 elgalu/selenium:2.48.2g

However adding a custom host IP to server-selenium.local (e.g. bsele ssh config) is more work:

Expand All @@ -94,30 +94,30 @@ However adding a custom host IP to server-selenium.local (e.g. bsele ssh config)

vncv localhost:5920 -Scaling=60% &

docker run --rm --name=ff -p=0.0.0.0:4471:24444 -p=0.0.0.0:5921:25900 elgalu/selenium:2.48.2f
docker run --rm --name=ff -p=0.0.0.0:4471:24444 -p=0.0.0.0:5921:25900 elgalu/selenium:2.48.2g

Automatic builds not working for me right now, maybe there is an issue with docker registry v1 vs v2
https://registry.hub.docker.com/u/elgalu/docker-selenium/builds_history/31621/

## Push version

docker login
docker push docker.io/elgalu/selenium:2.48.2f ;echo $?;beep
docker push docker.io/elgalu/selenium:2.48.2g ;echo $?;beep

Not working maybe because it has automated builds enabled but then it fails in the cloud but works locally
https://registry.hub.docker.com/u/elgalu/selenium/tags/manage/

docker push elgalu/selenium:2.48.2f
docker push elgalu/docker-selenium:2.48.2f
docker push docker.io/elgalu/docker-selenium:2.48.2f
docker push elgalu/selenium:2.48.2g
docker push elgalu/docker-selenium:2.48.2g
docker push docker.io/elgalu/docker-selenium:2.48.2g

## Pulling

docker pull registry.hub.docker.com/elgalu/selenium:2.48.2f
docker pull registry.hub.docker.com/elgalu/selenium:2.48.2g

## Pull

docker run -d --name=max -p=0.0.0.0:4411:24444 -p=0.0.0.0:5911:25900 elgalu/selenium:2.48.2f
docker run -d --name=max -p=0.0.0.0:4411:24444 -p=0.0.0.0:5911:25900 elgalu/selenium:2.48.2g

How to connect through vnc (need a vnc client)

Expand Down
4 changes: 2 additions & 2 deletions docs/videos.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
### Pull
Pull image

docker pull elgalu/selenium:2.48.2f
docker pull elgalu/selenium:2.48.2g

### Run
Run a new grid

docker run --rm --name=grid -p 4444:24444 -p 5920:25900 \
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \
-e VIDEO=true elgalu/selenium:2.48.2f
-e VIDEO=true elgalu/selenium:2.48.2g

### Wait
Wait for the grid to start
Expand Down

0 comments on commit 81bdd8d

Please sign in to comment.