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

Commit 0f865a5

Browse files
committed
Upgrade Chrome major to 50.0.2661.86
1 parent c191ff4 commit 0f865a5

File tree

9 files changed

+106
-79
lines changed

9 files changed

+106
-79
lines changed

.travis.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,22 @@ sudo: required
33
services:
44
- docker
55

6-
# Even though we run everything inside docker Travis require us to pick a
7-
# language else it will pick Ruby by default
6+
# Even though we run everything inside docker Travis require
7+
# us to pick a language else it will pick Ruby by default
88
language: python
99
python:
1010
- "2.7"
1111

1212
env:
1313
- TEST_SLEEPS="0.7"
1414

15-
# Note: When I try to map ports `-p ${SELENIUM_HUB_PORT}:${SELENIUM_HUB_PORT}`
16-
# I get Error response from daemon: Cannot start container 9da9d7a1176:
17-
# failed: iptables --wait -t filter -A DOCKER ! -i docker0 -o docker0
18-
# -p tcp -d 172.17.0.1 --dport 24444 -j ACCEPT:
19-
# iptables: No chain/target/match by that name. (exit status 1)
2015
before_install:
21-
- ./test/before_install_setup
16+
- travis_retry ./test/before_install_setup
2217
- travis_retry ./test/before_install_build
2318

2419
install:
2520
- ./test/install
2621

27-
# Note: If we try to use `--net` Travis fails with System error: permission denied
28-
# Note: If we try to use `--link` Selenium fails with ConnectionRefusedError after
29-
# connect to selenium at http://172.17.0.4:24444/wd/hub
30-
# Unless, we use `--privileged` trick by Hiro Asari from Travis Corp.
3122
script:
3223
- travis_retry ./test/script_scenario_1
3324
- ./test/script_scenario_2

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@ Note image ids also change after scm-source.json has being updated which trigger
77
###### To get container versions
88
docker exec grid versions
99

10+
## TBD_DOCKER_TAG
11+
+ Date: TBD_DATE
12+
+ Upgrade Chrome major to TBD_CHROME_STABLE
13+
+ Chore: modularize script_push a bit
14+
+ Chore: Update more changelog versions from Travis
15+
+ Image tag details:
16+
+ Selenium: vTBD_SELENIUM_VERSION (TBD_SELENIUM_REVISION)
17+
+ Chrome stable: TBD_CHROME_STABLE
18+
+ Firefox stable: TBD_FIREFOX_STABLE
19+
+ Chromedriver: TBD_CHROME_DRIVER (TBD_CHROMEDRIVER_COMMIT)
20+
+ Java: TBD_JAVA_VENDOR Java TBD_JAVA_BUILD
21+
+ Timezone: TBD_TIME_ZONE
22+
+ FROM ubuntu:UBUNTU_FLAVOR-UBUNTU_DATE
23+
+ Python: TBD_PYTHON_VERSION
24+
+ Sauce Connect TBD_SAUCE_CONNECT_VERS, build TBD_SAUCE_CONNECT_BUILD TBD_SAUCE_CONNECT_REVISION
25+
+ BrowserStack Local version TBD_BROWSER_STACK_VERSION
26+
+ Tested on kernel dev host: 4.4.0-21-generic x86_64
27+
+ Tested on kernel CI host: TBD_HOST_UNAME
28+
+ Built at dev host with: Docker version 1.11.0, build 4dc5990
29+
+ Built at CI host with: Docker version TBD_DOCKER_VERS, build TBD_DOCKER_BUILD
30+
+ Image size: TBD_IMAGE_SIZE
31+
+ Digest: TBD_DIGEST
32+
+ Image ID: TBD_IMAGE_ID
33+
1034
## 2.53.0h
1135
+ Date: 2016-04-14
1236
+ Upgrade Chrome major to 50.0.2661.75

CONTRIBUTING.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,45 @@
11
# Contributing
22

33
## Local
4+
For pull requests:
5+
46
./test/before_install_build && ./test/install && ./test/script_scenario_1
5-
./test/script_scenario_2 && ./test/script_archive && ./test/script_push && ./test/after_script
6-
open ./images/grid_console.png
7+
./test/script_scenario_2 && ./test/script_archive && ./test/script_push
8+
./test/after_script
9+
open ./images/grid_console.png #to verify the versions are correct
710
git checkout ./images/grid_console.png && open ./videos/chrome/test.mkv
8-
travis lint
9-
git checkout -b tmp-2.53.0h
10-
#git add ...
11-
git commit -m "Upgrade Chrome major to 50.0.2661.75 + chores"
12-
git tag 2.53.0h && git push origin tmp-2.53.0h && git push --tags
11+
travis lint #if you changed .travis.yml
12+
git checkout -b tmp-2.53.0i #name your branch according to your changes
13+
#git add ... git commit ... git push ... open pull request
14+
15+
For repository owners only:
16+
17+
git commit -m "Upgrade Chrome major to 50.0.2661.86"
18+
git tag 2.53.0i && git push origin tmp-2.53.0i && git push --tags
1319

14-
If Travis passes OK and changes got merged into master by elgalubot
20+
-- Wait for Travis to pass OK
21+
-- Make shure changes got merged into master by elgalubot
22+
-- Duplicate section in CHANGELOG.md starting with TBD_DOCKER_TAG
1523

16-
git checkout master && git pull && git branch -d tmp-2.53.0h && git push origin --delete tmp-2.53.0h
24+
git checkout master && git pull && git branch -d tmp-2.53.0i && git push origin --delete tmp-2.53.0i
1725

18-
Upgrade release tag in github.com with latest CHANGELOG.md
19-
If Chrome version changed upload:
26+
-- Upgrade release tag in github.com with latest CHANGELOG.md
27+
-- If Chrome version changed upload:
2028

2129
~/docker/binaries/
2230

2331
### Chrome artifact
2432
Keep certain bins if chrome version changed for example:
2533

26-
VER="50.0.2661.75"
34+
VER="50.0.2661.86"
2735
wget -nv --show-progress -O binaries/google-chrome-stable_${VER}_amd64.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
2836

2937
## Retry
3038
Failed in Travis? retry
3139

32-
git tag -d 2.53.0h && git push origin :2.53.0h
40+
git tag -d 2.53.0i && git push origin :2.53.0i
3341
#git add ...
34-
git commit --amend && git tag 2.53.0h && git push --force origin tmp-2.53.0h && git push --tags
42+
git commit --amend && git tag 2.53.0i && git push --force origin tmp-2.53.0i && git push --tags
3543

3644
## Docker push from Travis CI
3745
Travis [steps](https://docs.travis-ci.com/user/docker/#Pushing-a-Docker-Image-to-a-Registry) involve `docker login` and docker credentials encryptions.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
763763
# TODO: Use Google fingerprint to verify downloads
764764
# https://www.google.de/linuxrepositories/
765765
# Also fix .deb file names with correct version
766-
RUN latest_chrome_version_trigger="50.0.2661.75" \
766+
RUN latest_chrome_version_trigger="50.0.2661.86" \
767767
&& mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
768768
&& export CHROME_URL="https://dl.google.com/linux/direct" \
769769
&& wget -nv -O \

README.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Selenium in Docker with Chrome and Firefox
1+
<<h1 id="h1">Selenium in Docker with Chrome and Firefox</h1>
2+
23
[![Build Status](https://travis-ci.org/elgalu/docker-selenium.svg?branch=master)](https://travis-ci.org/elgalu/docker-selenium)
34
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/elgalu/docker-selenium?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
45

@@ -14,26 +15,25 @@
1415

1516
![docker-selenium-grid](./images/grid_console.png)
1617

17-
## Notes on similar repo: SeleniumHQ/docker-selenium
18-
See: https://github.com/SeleniumHQ/docker-selenium
18+
<h2 id="official">Notes on similar repo: SeleniumHQ/docker-selenium</h2>
1919

20-
Note SeleniumHQ/docker-selenium project is more useful for building selenium grids while this one focuses on building disposable standalone seleniums with [video recording support](./docs/videos.md) and both browsers on the same container. It also adds some other features like [customizing the screen size](#screen-size) and [ssh access](#ssh) that can be particularly useful for tunneling support.
20+
Note [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/docker-selenium) project is more useful for building selenium grids while this one focuses on building disposable standalone seleniums with [video recording support](./docs/videos.md) and both browsers on the same container. It also adds some other features like [customizing the screen size](#screen-size) and [ssh access](#ssh) that can be particularly useful for tunneling support.
2121

2222
### Run
2323

2424
1. Pull the image and run the container
2525

26-
docker pull elgalu/selenium:2.53.0h
26+
docker pull elgalu/selenium:2.53.0i
2727

28-
docker run --rm -ti --name=grid -p 4444:24444 -p 5920:25900 \
29-
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.53.0h
28+
docker run --rm -ti --name=grid -p 4444:24444 -p 5900:25900 \
29+
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola elgalu/selenium:2.53.0i
3030

3131
2. Wait until the grid starts properly before starting the tests _(Optional but recommended)_
3232

3333
docker exec grid wait_all_done 30s
3434

3535
After this, Selenium should be up and running at `http://localhost:4444/wd/hub`. Open the url in your browser to confirm it is running.
36-
If you are using Mac (OSX) `localhost` won't work! Find out the correct IP through `boot2docker ip` or `docker-machine ip default`.
36+
If you are using Mac (OSX) or [Microsoft Windows](https://docs.docker.com/engine/installation/windows/) `localhost` won't work! Find out the correct IP through `boot2docker ip` or `docker-machine ip default`.
3737

3838
**Notes:**
3939
* Add `sudo` only if needed in your environment
@@ -58,21 +58,21 @@ or former:
5858

5959
You can also ssh into the machine as long as `SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)"` is correct.
6060

61-
docker run --rm -ti --name=grid -p=4444:24444 -p=5920:25900 -p=22222:22222 \
61+
docker run --rm -ti --name=grid -p=4444:24444 -p=5900:25900 -p=22222:22222 \
6262
-e SSHD=true \
6363
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" \
64-
-v /dev/shm:/dev/shm elgalu/selenium:2.53.0h
64+
-v /dev/shm:/dev/shm elgalu/selenium:2.53.0i
6565

6666
Then
6767

6868
ssh -p 22222 -o StrictHostKeyChecking=no application@localhost
6969

7070
Include `-X` in ssh command if you want to redirect the started GUI programs to your host, but for that you also need to pass `-e SSHD_X11FORWARDING=yes`
7171

72-
docker run --rm -ti --name=grid -p=4444:24444 -p=5920:25900 -p=22222:22222 \
72+
docker run --rm -ti --name=grid -p=4444:24444 -p=5900:25900 -p=22222:22222 \
7373
-e SSHD=true -e SSHD_X11FORWARDING=yes \
7474
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" \
75-
-v /dev/shm:/dev/shm elgalu/selenium:2.53.0h
75+
-v /dev/shm:/dev/shm elgalu/selenium:2.53.0i
7676

7777
Then
7878

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

93-
docker pull elgalu/selenium:2.53.0h
93+
docker pull elgalu/selenium:2.53.0i
9494

95-
docker run -d --name=grid -p 4444:24444 -p 5920:25900 \
95+
docker run -d --name=grid -p 4444:24444 -p 5900:25900 \
9696
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \
9797
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1480 \
98-
elgalu/selenium:2.53.0h
98+
elgalu/selenium:2.53.0i
9999

100100
docker exec grid wait_all_done 10s
101101

102-
open vnc://:hola@localhost:5920
102+
open vnc://:hola@localhost:5900
103103

104104
### Chrome flavor
105105

@@ -112,7 +112,8 @@ To configure which Chrome flavor you want to use (stable, beta, unstable), just
112112
This feature was available in previous versions, please go to [2.47.1m] to use it.
113113
To configure which Firefox version to use, first check available versions in the [CHANGELOG](./CHANGELOG.md). Then pass `-e FIREFOX_VERSION=38.0.6` to `docker run`. Default is the latest number of the available list.
114114

115-
### Record Videos
115+
<<h3 id="video">Record Videos</h3>
116+
116117
Step by step guide at [docs/videos.md](./docs/videos.md)
117118

118119
If you create the container with `-e VIDEO=true` it will start recording a video through the vnc connection run upon start.
@@ -140,19 +141,19 @@ When you don't specify a VNC password, a random one will be generated. That pass
140141

141142
You can connect to see what's happening
142143

143-
open vnc://:ooGhai0aesaesh@localhost:5920
144+
open vnc://:ooGhai0aesaesh@localhost:5900
144145

145146
### noVNC
146147

147148
Disabled by default, [noVNC](https://github.com/kanaka/noVNC) provides a browser VNC client so you don't need to install a vnc viewer if you choose so. *Note:* we were using guacamole before.
148149

149-
Safari Browser already comes with a built-in vnc viewer so this feature is overkill and is disabled by default, just navigate to vnc://localhost:5920 in your Safari browser.
150+
Safari Browser already comes with a built-in vnc viewer so this feature is overkill and is disabled by default, just navigate to vnc://localhost:5900 in your Safari browser.
150151

151152
You need to pass the environment variable `-e NOVNC=true` in order to start the noVNC service and you will be able to open a browser at [localhost:6080](http://localhost:6080/vnc.html)
152153

153-
docker run --rm -ti --name=grid -p 4444:24444 -p 5920:25900 \
154+
docker run --rm -ti --name=grid -p 4444:24444 -p 5900:25900 \
154155
-v /dev/shm:/dev/shm -p 6080:26080 -e NOVNC=true \
155-
elgalu/selenium:2.53.0h
156+
elgalu/selenium:2.53.0i
156157

157158
If the VNC password was randomly generated find out with
158159

@@ -202,6 +203,8 @@ However this is now the default of this image, see `CHROME_ARGS="--no-sandbox"`
202203

203204
## Security
204205

206+
The docker images are built and pushed from [TravisCI](https://travis-ci.org/elgalu/docker-selenium/builds/123103275) for full traceability.
207+
205208
Do **NOT** expose your selenium grid to the outside world (e.g. in AWS), because Selenium does not provide auth. Therefore, if the ports are not firewalled malicious users will use [your selenium grid as a bot net](https://github.com/SeleniumHQ/docker-selenium/issues/147).
206209

207210
Put that firewall stuff aside, a file [scm-source.json](./scm-source.json) is included at the root directory of the generated image with information that helps to comply with auditing requirements to trace the creation of this docker image.
@@ -223,9 +226,9 @@ There are also additional steps you can take to ensure you're using the correct
223226

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

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

236239
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:
237240

238-
# e.g. sha256 for tag 2.53.0h
241+
# e.g. sha256 for tag 2.53.0i
239242
export SHA=<<Please see CHANGELOG.md>>
240243
docker pull elgalu/selenium@sha256:${SHA}
241244

@@ -267,7 +270,7 @@ Host machine, terminal 2:
267270
-v /dev/shm:/dev/shm \
268271
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
269272
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
270-
elgalu/selenium:2.53.0h
273+
elgalu/selenium:2.53.0i
271274

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

@@ -289,7 +292,7 @@ ANYPORT=0
289292
REMOTE_DOCKER_SRV=localhost
290293
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -p=0.0.0.0:${ANYPORT}:24444 \
291294
-p=0.0.0.0:${ANYPORT}:25900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
292-
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.53.0h
295+
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.53.0i
293296
294297
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
295298
# Useful if the docker server is running in the cloud. Establish free local ports
@@ -299,7 +302,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
299302
# it acts as a jump host so my public key is already on that server
300303
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -e SCREEN_HEIGHT=1110 \
301304
-e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" \
302-
elgalu/selenium:2.53.0h
305+
elgalu/selenium:2.53.0i
303306
304307
# -- Common: Wait for the container to start
305308
./host-scripts/wait-docker-selenium.sh grid 7s
@@ -370,7 +373,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
370373
371374
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:
372375
373-
docker pull elgalu/selenium:2.53.0h
376+
docker pull elgalu/selenium:2.53.0i
374377
375378
### 2. Use this image
376379
@@ -438,6 +441,7 @@ So `--pid=host` is included to avoid https://github.com/docker/docker/issues/589
438441
439442
## Who is using docker-selenium?
440443
444+
* [Zalando](https://tech.zalando.com/blog/)
441445
* [Shoov](http://www.gizra.com/content/phantomjs-chrome-docker-selenium-standalone/)
442446
* [smaato](http://blog.smaato.com/automated-end-to-end-testing-with-protractor-docker-jenkins)
443447
* [Algolia](https://github.com/algolia/instantsearch.js/#functional-tests)

0 commit comments

Comments
 (0)