From d91997de08e9ca15ef0e8bb74df42a9ed3321194 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Fri, 9 Jun 2017 17:43:41 -0500 Subject: [PATCH] add headless chrome option to build images --- .gitlab-ci.yml | 2 ++ ....8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6 | 15 +++++++++++++++ scripts/install-chrome | 12 ++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 Dockerfile.ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6 create mode 100755 scripts/install-chrome diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7cab87..18ef966 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,7 @@ ruby-2.3-git-2.7-phantomjs-2.1 test: *test_build ruby-2.3.3-git-2.7-phantomjs-2.1-node-7.1 test: *test_build ruby-2.3.3-golang-1.8-git-2.7-phantomjs-2.1-node-7.1 test: *test_build ruby-2.3.3-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6 test: *test_build +ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6 test: *test_build ruby-2.4.1-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6 test: *test_build www-gitlab-com test: *test_build doc-gitlab-com test: *test_build @@ -53,6 +54,7 @@ ruby-2.3-git-2.7-phantomjs-2.1: *build_and_deploy ruby-2.3.3-git-2.7-phantomjs-2.1-node-7.1: *build_and_deploy ruby-2.3.3-golang-1.8-git-2.7-phantomjs-2.1-node-7.1: *build_and_deploy ruby-2.3.3-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6: *build_and_deploy +ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6: *build_and_deploy ruby-2.4.1-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6: *build_and_deploy www-gitlab-com: *build_and_deploy doc-gitlab-com: *build_and_deploy diff --git a/Dockerfile.ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6 b/Dockerfile.ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6 new file mode 100644 index 0000000..16ba67a --- /dev/null +++ b/Dockerfile.ruby-2.3.3-golang-1.8-git-2.7-chrome-59.0-node-7.1-postgresql-9.6 @@ -0,0 +1,15 @@ +FROM ruby:2.3.3 + +ADD / / +RUN /scripts/install-essentials +RUN /scripts/install-chrome +RUN /scripts/install-node +RUN /scripts/install-golang +RUN /scripts/install-postgresql + +ENV PATH /usr/local/go/bin:$PATH + +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 diff --git a/scripts/install-chrome b/scripts/install-chrome new file mode 100755 index 0000000..28a5b71 --- /dev/null +++ b/scripts/install-chrome @@ -0,0 +1,12 @@ +#!/bin/bash + +set -xeo pipefail + +CHROME_VERSION=${1:-59.0.3071.86-1} + +curl -sS -L https://dl.google.com/linux/linux_signing_key.pub | apt-key add - +echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list + +apt-get update -q +env DEBIAN_FRONTEND="noninteractive" apt-get install -y google-chrome-stable=$CHROME_VERSION +rm -rf /var/lib/apt/lists/*