33# ##################################################
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/
6- FROM ubuntu:xenial-20160818
6+ FROM ubuntu:xenial-20160923.1
77ENV UBUNTU_FLAVOR="xenial" \
8- UBUNTU_DATE="20160818 "
8+ UBUNTU_DATE="20160923.1 "
99
1010# == Ubuntu wily is 15.10, i.e. FROM ubuntu:15.10
1111# FROM ubuntu:wily-20151208
@@ -47,6 +47,9 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 \
4747# Remove with: sudo apt-key del 3B4FE6ACC0B21F32
4848RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 \
4949 && apt-key update -qqy
50+ # Remove with: sudo apt-key del A2F683C52980AECF
51+ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A2F683C52980AECF \
52+ && apt-key update -qqy
5053
5154# ========================
5255# Miscellaneous packages
@@ -418,16 +421,6 @@ RUN apt-get -qqy update \
418421# && npm install -g gifify \
419422# && gifify --version
420423
421- # ==========================
422- # Mozilla Firefox - Latest
423- # ==========================
424- # RUN apt-get -qqy update \
425- # && apt-get -qqy install \
426- # firefox \
427- # && rm -rf /var/lib/apt/lists/*
428- # If we are not installing latest from apt sources then remove (purge) default
429- RUN apt-get -qqy purge firefox
430-
431424# =========================================================
432425# Python2 for Supervisor, selenium tests, and other stuff
433426# =========================================================
@@ -460,6 +453,7 @@ RUN apt-get -qqy update \
460453
461454ENV CPU_ARCH 64
462455ENV SEL_HOME ${NORMAL_USER_HOME}/selenium
456+ RUN mkdir -p ${SEL_HOME}
463457
464458# ===============================
465459# Mozilla Firefox install tools
@@ -673,12 +667,32 @@ RUN cd /tmp \
673667# && rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
674668# ;done
675669
670+ # ==========================
671+ # Mozilla Firefox - Latest
672+ # ==========================
673+ # RUN apt-get -qqy update \
674+ # && apt-get -qqy install \
675+ # firefox \
676+ # && rm -rf /var/lib/apt/lists/*
677+ # ENV FF_VER="latest" \
678+ # FF_LANG="en-US" \
679+ # FF_DEST="/usr/lib/firefox"
680+ # ENV FIREFOX_DEST_BIN="${FF_DEST}/firefox"
681+ # RUN ln -fs ${FIREFOX_DEST_BIN} /usr/bin/firefox
682+
676683# -------------------------#
677684# FIREFOX_VERSIONS Latest #
678685# -------------------------#
679686# Install Latest available firefox version
680687# this also used to work: ENV FIREFOX_LATEST_VERSION latest
681688#
689+ # --- Nightly
690+ # ENV FF_VER="52.0a0" \
691+ # FF_PLATFORM="linux-i686" \
692+ # FF_INNER_PATH="firefox/nightly/latest-mozilla-central"
693+ # ENV FF_COMP="firefox-${FF_VER}.${FF_LANG}.${FF_PLATFORM}.tar.bz2"
694+ # ENV FF_URL="${FF_BASE_URL}/${FF_INNER_PATH}/${FF_COMP}"
695+ #
682696# Where to find latest version:
683697# https://archive.mozilla.org/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
684698# https://download-installer.cdn.mozilla.net/pub/mozilla.org/firefox/releases/latest/linux-x86_64/en-US/
@@ -688,19 +702,42 @@ RUN cd /tmp \
688702# FF_LANG can be either en-US // de // fr and so on
689703# Regarding the pip packages, see released versions at:
690704# https://github.com/mozilla/mozdownload/releases
691- ENV FF_VER="47.0.1" \
692- FF_LANG="en-US" \
693- FF_PLATFORM="linux-x86_64" \
705+
706+ ENV FF_LANG="en-US" \
694707 FF_BASE_URL="https://archive.mozilla.org/pub" \
695708 FF_DEST="${SEL_HOME}/firefox"
696- ENV FF_COMP="firefox-${FF_VER}.tar.bz2" \
697- FIREFOX_DEST_BIN="${FF_DEST}/firefox"
698- ENV FF_URL "${FF_BASE_URL}/firefox/releases/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
709+ ENV FIREFOX_DEST_BIN="${FF_DEST}/firefox"
710+
711+ # --- Stable
712+ ENV FF_VER="47.0.1" \
713+ FF_PLATFORM="linux-x86_64" \
714+ FF_INNER_PATH="firefox/releases"
715+ ENV FF_COMP="firefox-${FF_VER}.tar.bz2"
716+ ENV FF_URL="${FF_BASE_URL}/${FF_INNER_PATH}/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
717+
699718RUN mkdir -p ${SEL_HOME} && cd ${SEL_HOME} \
700719 && wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
701720 && bzip2 -d "firefox.tar.bz2" \
702721 && tar xf "firefox.tar" \
703- && rm "firefox.tar"
722+ && rm "firefox.tar" \
723+ && sudo ln -fs ${FIREFOX_DEST_BIN} /usr/bin/firefox
724+
725+ # ============
726+ # GeckoDriver
727+ # ============
728+ ENV GECKOD_VER="0.10.0" \
729+ GECKOD_URL="https://github.com/mozilla/geckodriver/releases/download"
730+ RUN wget --no-verbose -O /tmp/geckodriver.tar.gz \
731+ "${GECKOD_URL}/v${GECKOD_VER}/geckodriver-v${GECKOD_VER}-linux64.tar.gz" \
732+ && rm -rf /opt/geckodriver* \
733+ && tar -C /opt -xvzf /tmp/geckodriver.tar.gz \
734+ && mv /opt/geckodriver /usr/bin/geckodriver \
735+ && chmod +x /usr/bin/geckodriver \
736+ && ln -fs /usr/bin/geckodriver /opt/geckodriver \
737+ && ln -fs /usr/bin/geckodriver ${FF_DEST}/geckodriver \
738+ && ln -fs /usr/bin/geckodriver /usr/bin/wires \
739+ && ln -fs /usr/bin/geckodriver ${FF_DEST}/wires \
740+ && rm /tmp/geckodriver.tar.gz
704741
705742 # && rm -rf ${NORMAL_USER_HOME}/firefox-src
706743# RUN mkdir -p ${NORMAL_USER_HOME}/firefox-src \
@@ -977,6 +1014,8 @@ ENV FIREFOX_VERSION="${FF_VER}" \
9771014 SELENIUM_NODE_PROXY_PARAMS="" \
9781015 # To taggle issue #58 see https://goo.gl/fz6RTu
9791016 CHROME_ARGS="--no-sandbox" \
1017+ # Will be passed with: -Dwebdriver.chrome.verboseLogging
1018+ CHROME_VERBOSELOGGING="true" \
9801019 # e.g. CHROME_ARGS="--no-sandbox --ignore-certificate-errors" \
9811020 # SELENIUM_NODE_CHROME_PARAMS='-Dselenium.chrome.args="--no-sandbox"' \
9821021 # WEBDRIVER_NODE_CHROME_PARAMS='-Dwebdriver.chrome.args="--no-sandbox"' \
@@ -1125,9 +1164,8 @@ ENV FIREFOX_VERSION="${FF_VER}" \
11251164 # Usage: docker run -v /var/run/docker.sock:/var/run/docker.sock
11261165 # -v $(which docker):$(which docker)
11271166 DOCKER_SOCK="/var/run/docker.sock" \
1128- # DBUS hack thanks @pwaller
1129- # https://github.com/SeleniumHQ/docker-selenium/issues/87#issuecomment-187659234
1130- DBUS_SESSION_BUS_ADDRESS=/dev/null \
1167+ # for DBUS hacks, see entry.sh
1168+ # DBUS_SESSION_BUS_ADDRESS="unix:abstract=/dev/null" \
11311169 # Selenium test steps sleep
11321170 TEST_SLEEPS="0.5" \
11331171 # Restore
0 commit comments