Commit 2c33ee9e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Dockerize headless chrome browser for GitLab QA

parent 6984c2ee
FROM ruby:2.3 FROM ruby:2.3
LABEL maintainer "Grzegorz Bizon <grzegorz@gitlab.com>" LABEL maintainer "Grzegorz Bizon <grzegorz@gitlab.com>"
RUN sed -i "s/httpredir.debian.org/ftp.us.debian.org/" /etc/apt/sources.list && \ ##
apt-get update && apt-get install -y --force-yes \ # Update APT sources and install some dependencies
libqt5webkit5-dev qt5-qmake qt5-default build-essential xvfb git && \ #
apt-get clean RUN sed -i "s/httpredir.debian.org/ftp.us.debian.org/" /etc/apt/sources.list
RUN apt-get update && apt-get install -y wget git unzip xvfb
##
# At this point Google Chrome Beta is 59 - first version with headless support
#
RUN wget -q https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb
RUN dpkg -i google-chrome-beta_current_amd64.deb; apt-get -fy install
##
# Install chromedriver to make it work with Selenium
#
RUN wget -q https://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip
RUN unzip chromedriver_linux64.zip -d /usr/local/bin
RUN apt-get clean
WORKDIR /home/qa WORKDIR /home/qa
......
...@@ -56,7 +56,7 @@ module QA ...@@ -56,7 +56,7 @@ module QA
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
'chromeOptions' => { 'chromeOptions' => {
'binary' => '/opt/google/chrome-beta/google-chrome-beta', 'binary' => '/opt/google/chrome-beta/google-chrome-beta',
'args' => %w[headless disable-gpu] 'args' => %w[headless no-sandbox disable-gpu]
} }
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment