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

Commit 8ed100d

Browse files
committed
Upgrade Ubuntu, Chrome, Firefox
1 parent 64574f0 commit 8ed100d

File tree

6 files changed

+165
-85
lines changed

6 files changed

+165
-85
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,28 @@ 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+
## 2.52.0g (2016-03-09)
11+
+ Upgrade Ubuntu xenial to 20160303.1
12+
+ Upgrade Firefox (major) to 45.0
13+
+ Upgrade Chrome (patch) to 49.0.2623.87
14+
+ Remove/comment noVNC as is not being used
15+
+ Image tag details:
16+
+ Selenium: v2.52.0 (4c2593c)
17+
+ Chrome stable: 49.0.2623.87
18+
+ Firefox stable: 45.0
19+
+ Chromedriver: 2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a)
20+
+ Java: Oracle Java 9 build 9-ea+102-2016-01-21-001533.javare.4316.nc
21+
+ Timezone: Europe/Berlin
22+
+ Built with: Docker version 1.9.1, build a34a1d5
23+
+ Tested on kernel host: 4.2.0-32-generic x86_64 GNU/Linux
24+
+ Image size: 2.603 GB
25+
+ FROM ubuntu:xenial-20160303.1
26+
+ Python: 2.7.11+
27+
+ Sauce Connect 4.3.13, build 1877 d9e5947
28+
+ BrowserStack Local version 4.8
29+
+ Image ID: TBD
30+
+ Digest: sha256:TBD
31+
1032
## 2.52.0f (2016-03-02)
1133
+ Upgrade Chrome to 49.0.2623.75
1234
+ Image tag details:

Dockerfile

Lines changed: 85 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#== Ubuntu xenial is 16.04, i.e. FROM ubuntu:16.04
55
# search for more at https://registry.hub.docker.com/_/ubuntu/tags/manage/
66
# next: xenial-TBD
7-
FROM ubuntu:xenial-20160226
7+
FROM ubuntu:xenial-20160303.1
88
ENV UBUNTU_FLAVOR xenial
99

1010
#== Ubuntu wily is 15.10, i.e. FROM ubuntu:15.10
@@ -260,7 +260,7 @@ USER root
260260
# - try /opt/google/chrome/chrome-sandbox see: https://github.com/web-animations/web-animations-js/blob/master/.travis-setup.sh#L66
261261
# Package libnss3-1d might help with issue 20
262262
# libnss3-1d \
263-
# RUN wget --no-verbose -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
263+
# RUN wget -nv -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
264264
# && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
265265
# && apt-get update -qqy \
266266
# && apt-get -qqy install \
@@ -323,27 +323,38 @@ RUN apt-get update -qqy \
323323
########################################
324324
# noVNC to expose VNC via an html page #
325325
########################################
326-
RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
327-
# Download noVNC commit 8f3c0f6b9 dated 2015-07-01
328-
&& export NOVNC_SHA="8f3c0f6b9b5e5c23a7dc7e90bd22901017ab4fc7" \
329-
&& wget --no-verbose -O noVNC.zip \
330-
"https://github.com/kanaka/noVNC/archive/${NOVNC_SHA}.zip" \
331-
&& unzip -x noVNC.zip \
332-
&& mv noVNC-${NOVNC_SHA} \
333-
${NORMAL_USER_HOME}/noVNC \
334-
# Download websockify commit 558a6439f dated 2015-06-02
335-
&& export WEBSOCKIFY_SHA="558a6439f14b0d85a31145541745e25c255d576b" \
336-
&& wget --no-verbose -O websockify.zip \
337-
"https://github.com/kanaka/websockify/archive/${WEBSOCKIFY_SHA}.zip" \
338-
&& unzip -x websockify.zip \
339-
&& mv websockify-${WEBSOCKIFY_SHA} \
340-
${NORMAL_USER_HOME}/noVNC/utils/websockify
326+
# RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
327+
# # Download noVNC commit 8f3c0f6b9 dated 2015-07-01
328+
# && export NOVNC_SHA="8f3c0f6b9b5e5c23a7dc7e90bd22901017ab4fc7" \
329+
# && wget -nv -O noVNC.zip \
330+
# "https://github.com/kanaka/noVNC/archive/${NOVNC_SHA}.zip" \
331+
# && unzip -x noVNC.zip \
332+
# && mv noVNC-${NOVNC_SHA} \
333+
# ${NORMAL_USER_HOME}/noVNC \
334+
# # Download websockify commit 558a6439f dated 2015-06-02
335+
# && export WEBSOCKIFY_SHA="558a6439f14b0d85a31145541745e25c255d576b" \
336+
# && wget -nv -O websockify.zip \
337+
# "https://github.com/kanaka/websockify/archive/${WEBSOCKIFY_SHA}.zip" \
338+
# && unzip -x websockify.zip \
339+
# && mv websockify-${WEBSOCKIFY_SHA} \
340+
# ${NORMAL_USER_HOME}/noVNC/utils/websockify
341341

342342
#===============================
343343
# ffmpeg/libav and video codecs
344344
#===============================
345345
# ffmpeg (ffmpeg): Is a better alternative to Pyvnc2swf
346346
# (use in Ubuntu >= 15) packages: ffmpeg
347+
# RUN apt-get update -qqy \
348+
# && apt-get -qqy install \
349+
# libx264-dev \
350+
# libvorbis-dev \
351+
# libx11-dev \
352+
# ffmpeg \
353+
# && rm -rf /var/lib/apt/lists/*
354+
355+
#===============================
356+
# ffmpeg/libav and video codecs
357+
#===============================
347358
# libav-tools (avconv): Is a fork of ffmpeg
348359
# (use in Ubuntu <= 14) packages: libav-tools libx264-142
349360
RUN apt-get update -qqy \
@@ -354,6 +365,52 @@ RUN apt-get update -qqy \
354365
libav-tools \
355366
&& rm -rf /var/lib/apt/lists/*
356367

368+
#=======================================================
369+
# video-to-animated-gifs with vvo/gifify and imagemagick
370+
#=======================================================
371+
# gifify: check elgalu/gifify-docker instead
372+
# imagemagick convert between image formats as well as transformations
373+
# RUN apt-get update -qqy \
374+
# && apt-get -qqy install \
375+
# imagemagick \
376+
# fontconfig \
377+
# libfontconfig1 \
378+
# libfontconfig1-dev \
379+
# libass5 \
380+
# libass-dev \
381+
# && rm -rf /var/lib/apt/lists/*
382+
383+
#=====================
384+
# gifsicle for gifify
385+
#=====================
386+
# install fork of gifsicle with better lossless gif support
387+
# ENV GIFS_VER=1.82.1
388+
# RUN cd /usr/local/lib \
389+
# && wget -nv "https://github.com/pornel/giflossy/releases/download/lossy%2F${GIFS_VER}/gifsicle-${GIFS_VER}-lossy.zip" \
390+
# && unzip gifsicle-${GIFS_VER}-lossy.zip -d gifsicle \
391+
# && rm gifsicle-${GIFS_VER}-lossy.zip \
392+
# && mv gifsicle/linux/gifsicle-debian6 /usr/local/bin/gifsicle \
393+
# && gifsicle --version
394+
395+
#=================================
396+
# NodeJS so we can install gifify
397+
#=================================
398+
# See gifify options at https://github.com/vvo/gifify#command-line-usage
399+
# some possible versions: v4.3.2, v5.7.1
400+
# ENV NODE_VER="v5.7.1" \
401+
# NODE_PLATFORM="linux-x64" \
402+
# PATH=/usr/local/lib/node/bin:$PATH
403+
# RUN NODE_FIL="node-${NODE_VER}-${NODE_PLATFORM}" \
404+
# && cd /usr/local/lib \
405+
# && wget -nv "https://nodejs.org/dist/${NODE_VER}/${NODE_FIL}.tar.xz" \
406+
# && tar xf ${NODE_FIL}.tar.xz \
407+
# && rm ${NODE_FIL}.tar.* \
408+
# && mv ${NODE_FIL} node \
409+
# && node --version \
410+
# && npm --version \
411+
# && npm install -g gifify \
412+
# && gifify --version
413+
357414
#==========================
358415
# Mozilla Firefox - Latest
359416
#==========================
@@ -562,7 +619,7 @@ RUN SHA="eb904ccdb3573e22784ad36fa81de3cbd718afea" \
562619
ENV SAUCE_CONN_VER="sc-4.3.13-linux" \
563620
SAUCE_CONN_DOWN_URL="https://saucelabs.com/downloads"
564621
RUN cd /tmp \
565-
&& wget --no-verbose "${SAUCE_CONN_DOWN_URL}/${SAUCE_CONN_VER}.tar.gz" \
622+
&& wget -nv "${SAUCE_CONN_DOWN_URL}/${SAUCE_CONN_VER}.tar.gz" \
566623
&& tar -zxf ${SAUCE_CONN_VER}.tar.gz \
567624
&& rm -rf /usr/local/${SAUCE_CONN_VER} \
568625
&& mv ${SAUCE_CONN_VER} /usr/local \
@@ -576,7 +633,7 @@ RUN cd /tmp \
576633
ENV BSTACK_TUNNEL_URL="https://www.browserstack.com/browserstack-local" \
577634
BSTACK_TUNNEL_ZIP="BrowserStackLocal-linux-x64.zip"
578635
RUN cd /tmp \
579-
&& wget --no-verbose "${BSTACK_TUNNEL_URL}/${BSTACK_TUNNEL_ZIP}" \
636+
&& wget -nv "${BSTACK_TUNNEL_URL}/${BSTACK_TUNNEL_ZIP}" \
580637
&& unzip ${BSTACK_TUNNEL_ZIP} \
581638
&& chmod 755 BrowserStackLocal \
582639
&& rm ${BSTACK_TUNNEL_ZIP} \
@@ -617,15 +674,15 @@ RUN cd /tmp \
617674
# FF_LANG can be either en-US // de // fr and so on
618675
# Regarding the pip packages, see released versions at:
619676
# https://github.com/mozilla/mozdownload/releases
620-
ENV FF_VER="44.0.2" \
677+
ENV FF_VER="45.0" \
621678
FF_LANG="en-US" \
622679
FF_PLATFORM="linux-x86_64" \
623680
FF_BASE_URL="https://archive.mozilla.org/pub" \
624681
FF_DEST="${SEL_HOME}/firefox"
625682
ENV FF_COMP="firefox-${FF_VER}.tar.bz2"
626683
ENV FF_URL "${FF_BASE_URL}/firefox/releases/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
627684
RUN mkdir -p ${SEL_HOME} && cd ${SEL_HOME} \
628-
&& wget --no-verbose "${FF_URL}" -O "firefox.tar.bz2" \
685+
&& wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
629686
&& bzip2 -d "firefox.tar.bz2" \
630687
&& tar xf "firefox.tar" \
631688
&& rm "firefox.tar"
@@ -666,7 +723,7 @@ ENV SEL_PATCH_LEVEL_VER 0
666723
RUN mkdir -p ${SEL_HOME} \
667724
&& export SELBASE="http://selenium-release.storage.googleapis.com" \
668725
&& export SELPATH="${SEL_MAJOR_MINOR_VER}/selenium-server-standalone-${SEL_MAJOR_MINOR_VER}.${SEL_PATCH_LEVEL_VER}.jar" \
669-
&& wget --no-verbose ${SELBASE}/${SELPATH} \
726+
&& wget -nv ${SELBASE}/${SELPATH} \
670727
-O ${SEL_HOME}/selenium-server-standalone.jar
671728

672729
#==================
@@ -681,7 +738,7 @@ RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
681738
&& CHROME_DRIVER_VERSION="2.21" \
682739
# && CHROME_DRIVER_VERSION=$(curl 'http://chromedriver.storage.googleapis.com/LATEST_RELEASE' 2> /dev/null) \
683740
&& CHROME_DRIVER_URL="${CHROME_DRIVER_BASE}/${CHROME_DRIVER_VERSION}/${CHROME_DRIVER_FILE}" \
684-
&& wget --no-verbose -O chromedriver_linux${CPU_ARCH}.zip ${CHROME_DRIVER_URL} \
741+
&& wget -nv -O chromedriver_linux${CPU_ARCH}.zip ${CHROME_DRIVER_URL} \
685742
&& cd ${SEL_HOME} \
686743
&& rm -rf chromedriver \
687744
&& unzip ${NORMAL_USER_HOME}/tmp/chromedriver_linux${CPU_ARCH}.zip \
@@ -696,24 +753,24 @@ RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
696753
# Google Chrome download
697754
#========================
698755
# How to download chrome-deb locally to keep them
699-
# wget --no-verbose -O /tmp/google-chrome-stable_current_amd64.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
756+
# wget -nv -O /tmp/google-chrome-stable_current_amd64.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
700757

701758
# How to get notified of latest version of chrome:
702759
# https://chrome.google.com/webstore/detail/the-latest-versions-of-go/bibclkcoilbnbnppanidhimphmfbjaab
703760
# TODO: Use Google fingerprint to verify downloads
704761
# http://www.google.de/linuxrepositories/
705762
# Also fix .deb file names with correct version
706-
RUN latest_chrome_version_trigger="49.0.2623.75" \
763+
RUN latest_chrome_version_trigger="49.0.2623.87" \
707764
&& mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
708765
&& export CHROME_URL="https://dl.google.com/linux/direct" \
709-
&& wget --no-verbose -O \
766+
&& wget -nv -O \
710767
${NORMAL_USER_HOME}/chrome-deb/google-chrome-stable_current_amd64.deb \
711768
"${CHROME_URL}/google-chrome-stable_current_amd64.deb"
712769
# Other chrome flavors are commented now since they were not being used:
713-
# && wget --no-verbose -O \
770+
# && wget -nv -O \
714771
# ${NORMAL_USER_HOME}/chrome-deb/google-chrome-beta_current_amd64.deb \
715772
# "${CHROME_URL}/google-chrome-beta_current_amd64.deb" \
716-
# && wget --no-verbose -O \
773+
# && wget -nv -O \
717774
# ${NORMAL_USER_HOME}/chrome-deb/google-chrome-unstable_current_amd64.deb \
718775
# "${CHROME_URL}/google-chrome-unstable_current_amd64.deb"
719776
# Where to find old versions of chrome:

README.md

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Note SeleniumHQ/docker-selenium project is more useful for building selenium gri
2222

2323
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.
2424

25-
docker pull elgalu/selenium:2.52.0f
25+
docker pull elgalu/selenium:2.52.0g
2626

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

3030
Make sure `docker run` finishes via active wait with below command. Note `grid` is the name of the container:
3131

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

67-
docker pull elgalu/selenium:2.52.0f
67+
docker pull elgalu/selenium:2.52.0g
6868

6969
docker run -d --name=grid -p 4444:24444 -p 5920:25900 \
7070
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \
7171
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1480 \
72-
elgalu/selenium:2.52.0f
72+
elgalu/selenium:2.52.0g
7373

7474
docker exec grid wait_all_done 10s
7575

@@ -113,23 +113,6 @@ You can connect to see what's happening
113113

114114
open vnc://:ooGhai0aesaesh@localhost:5920
115115

116-
### noVNC
117-
118-
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.
119-
120-
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.
121-
122-
You need to pass the environment variable `-e NOVNC=true` in order to start the noVNC service and will be able to open a browser at [localhost:6080](http://localhost:6080/vnc.html)
123-
124-
docker run --rm --name=grid -p 4444:24444 -p 5920:25900 \
125-
-p 6080:26080 -e NOVNC=true \
126-
elgalu/selenium:2.52.0f
127-
128-
If the VNC password was randomly generated find out with
129-
130-
docker exec grid grep "was generated for you:" /var/log/cont/vnc-stdout.log
131-
#=> a VNC password was generated for you: ooGhai0aesaesh
132-
133116
## Chrome crashed
134117

135118
If your tests crashes in Chrome you may need to increase shm size or simply start your container by sharing `-v /dev/shm:/dev/shm`
@@ -190,9 +173,9 @@ There are also additional steps you can take to ensure you're using the correct
190173

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

193-
# e.g. full image id for tag 2.52.0f
176+
# e.g. full image id for tag 2.52.0g
194177
export IMGID="<<Please see CHANGELOG.md>>"
195-
if docker inspect -f='{{.Id}}' elgalu/selenium:2.52.0f |grep ${IMGID} &> /dev/null; then
178+
if docker inspect -f='{{.Id}}' elgalu/selenium:2.52.0g |grep ${IMGID} &> /dev/null; then
196179
echo "Image ID tested ok"
197180
else
198181
echo "Image ID doesn't match"
@@ -202,7 +185,7 @@ You can simply verify that image id is indeed the correct one.
202185

203186
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:
204187

205-
# e.g. sha256 for tag 2.52.0f
188+
# e.g. sha256 for tag 2.52.0g
206189
export SHA=<<Please see CHANGELOG.md>>
207190
docker pull elgalu/selenium@sha256:${SHA}
208191

@@ -228,7 +211,7 @@ Host machine, terminal 2:
228211
docker run --rm --name=ch -p=4444:24444 \
229212
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
230213
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
231-
elgalu/selenium:2.52.0f
214+
elgalu/selenium:2.52.0g
232215

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

@@ -250,7 +233,7 @@ ANYPORT=0
250233
REMOTE_DOCKER_SRV=localhost
251234
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -p=0.0.0.0:${ANYPORT}:24444 \
252235
-p=0.0.0.0:${ANYPORT}:25900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
253-
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.52.0f
236+
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.52.0g
254237
255238
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
256239
# Useful if the docker server is running in the cloud. Establish free local ports
@@ -260,7 +243,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
260243
# it acts as a jump host so my public key is already on that server
261244
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -e SCREEN_HEIGHT=1110 \
262245
-e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" \
263-
elgalu/selenium:2.52.0f
246+
elgalu/selenium:2.52.0g
264247
265248
# -- Common: Wait for the container to start
266249
./host-scripts/wait-docker-selenium.sh grid 7s
@@ -331,7 +314,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
331314
332315
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:
333316
334-
docker pull elgalu/selenium:2.52.0f
317+
docker pull elgalu/selenium:2.52.0g
335318
336319
#### 2. Use this image
337320
@@ -400,6 +383,8 @@ So `--pid=host` is included to avoid https://github.com/docker/docker/issues/589
400383
### Who is using docker-selenium?
401384
402385
* [Shoov](http://www.gizra.com/content/phantomjs-chrome-docker-selenium-standalone/)
386+
* [smaato](http://blog.smaato.com/automated-end-to-end-testing-with-protractor-docker-jenkins)
387+
* many more! please ping @elgalu to add you here
403388
404389
### Troubleshooting
405390
@@ -412,8 +397,6 @@ $ docker logs -f <container-id|container-name>
412397
Powered by Supervisor, the container leaves many logs;
413398
414399
/var/log/cont/docker-selenium-status.log
415-
/var/log/cont/novnc-stderr.log
416-
/var/log/cont/novnc-stdout.log
417400
/var/log/cont/selenium-hub-stderr.log
418401
/var/log/cont/selenium-hub-stdout.log
419402
/var/log/cont/selenium-node-chrome-stderr.log

0 commit comments

Comments
 (0)