From ba27de2fd4cf406a1e3164675683de6a5acde370 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 12 Aug 2016 11:11:59 -0700 Subject: [PATCH 1/4] Add phantomjs2 images We want to keep the old images so the current stable and patch releases continue to work. --- .gitlab-ci.yml | 3 +++ Dockerfile.ruby-2.1-phantomjs2 | 8 ++++++++ Dockerfile.ruby-2.2-phantomjs2 | 8 ++++++++ Dockerfile.ruby-2.3-phantomjs2 | 8 ++++++++ scripts/install-phantomjs | 9 ++++++--- 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 Dockerfile.ruby-2.1-phantomjs2 create mode 100644 Dockerfile.ruby-2.2-phantomjs2 create mode 100644 Dockerfile.ruby-2.3-phantomjs2 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c0d8ae..d31de45 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,9 @@ ruby-2.3 test: *test_build www-gitlab-com test: *test_build ruby-2.1: *build_and_deploy +ruby-2.1-phantomjs2: *build_and_deploy ruby-2.2: *build_and_deploy +ruby-2.2-phantomjs2: *build_and_deploy ruby-2.3: *build_and_deploy +ruby-2.3-phantomjs2: *build_and_deploy www-gitlab-com: *build_and_deploy diff --git a/Dockerfile.ruby-2.1-phantomjs2 b/Dockerfile.ruby-2.1-phantomjs2 new file mode 100644 index 0000000..9868f32 --- /dev/null +++ b/Dockerfile.ruby-2.1-phantomjs2 @@ -0,0 +1,8 @@ +FROM ruby:2.1 + +ENV PACKAGES="git-core" \ + LC_ALL=en_US.UTF-8 + +ADD / / +RUN /scripts/install-essentials +RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.2-phantomjs2 b/Dockerfile.ruby-2.2-phantomjs2 new file mode 100644 index 0000000..46fcdd2 --- /dev/null +++ b/Dockerfile.ruby-2.2-phantomjs2 @@ -0,0 +1,8 @@ +FROM ruby:2.2 + +ENV PACKAGES="git-core" \ + LC_ALL=en_US.UTF-8 + +ADD / / +RUN /scripts/install-essentials +RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.3-phantomjs2 b/Dockerfile.ruby-2.3-phantomjs2 new file mode 100644 index 0000000..02be75b --- /dev/null +++ b/Dockerfile.ruby-2.3-phantomjs2 @@ -0,0 +1,8 @@ +FROM ruby:2.3 + +ENV PACKAGES="git-core" \ + LC_ALL=en_US.UTF-8 + +ADD / / +RUN /scripts/install-essentials +RUN /scripts/install-phantomjs 2.1.1 diff --git a/scripts/install-phantomjs b/scripts/install-phantomjs index 9de98b2..f58d58e 100755 --- a/scripts/install-phantomjs +++ b/scripts/install-phantomjs @@ -3,6 +3,9 @@ set -xeo pipefail cd /tmp -wget -q https://gitlab.com/axil/phantomjs-debian/raw/master/phantomjs_1.9.8-0jessie_amd64.deb -dpkg -i phantomjs_1.9.8-0jessie_amd64.deb -rm /tmp/* + +PHANTOMJS_VERSION=${1:-1.9.8} +PHANTOMJS_FILE="phantomjs-$PHANTOMJS_VERSION-linux-x86_64" +curl -L "https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOMJS_FILE.tar.bz2" | tar jx +cp "$PHANTOMJS_FILE/bin/phantomjs" "/usr/bin/" +rm -rf /tmp/* From e1f3488d98b3aeeed4536014b47a936a768460f7 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Fri, 9 Sep 2016 19:24:31 +0200 Subject: [PATCH 2/4] Shuffle files around --- Dockerfile.ruby-2.1 | 12 +++--------- Dockerfile.ruby-2.1-gitlab-8.11 | 14 ++++++++++++++ Dockerfile.ruby-2.1-phantomjs2 | 8 -------- Dockerfile.ruby-2.2 | 12 +++--------- Dockerfile.ruby-2.2-gitlab-8.11 | 14 ++++++++++++++ Dockerfile.ruby-2.2-phantomjs2 | 8 -------- Dockerfile.ruby-2.3 | 14 ++++---------- Dockerfile.ruby-2.3-gitlab-8.11 | 14 ++++++++++++++ Dockerfile.ruby-2.3-phantomjs2 | 8 -------- 9 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 Dockerfile.ruby-2.1-gitlab-8.11 delete mode 100644 Dockerfile.ruby-2.1-phantomjs2 create mode 100644 Dockerfile.ruby-2.2-gitlab-8.11 delete mode 100644 Dockerfile.ruby-2.2-phantomjs2 create mode 100644 Dockerfile.ruby-2.3-gitlab-8.11 delete mode 100644 Dockerfile.ruby-2.3-phantomjs2 diff --git a/Dockerfile.ruby-2.1 b/Dockerfile.ruby-2.1 index 35cd5f1..9868f32 100644 --- a/Dockerfile.ruby-2.1 +++ b/Dockerfile.ruby-2.1 @@ -1,14 +1,8 @@ FROM ruby:2.1 -ENV PACKAGES="git-core" +ENV PACKAGES="git-core" \ + LC_ALL=en_US.UTF-8 ADD / / RUN /scripts/install-essentials - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -RUN /scripts/install-phantomjs +RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.1-gitlab-8.11 b/Dockerfile.ruby-2.1-gitlab-8.11 new file mode 100644 index 0000000..35cd5f1 --- /dev/null +++ b/Dockerfile.ruby-2.1-gitlab-8.11 @@ -0,0 +1,14 @@ +FROM ruby:2.1 + +ENV PACKAGES="git-core" + +ADD / / +RUN /scripts/install-essentials + +# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ +# Must be set after install-essentials is run +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN /scripts/install-phantomjs diff --git a/Dockerfile.ruby-2.1-phantomjs2 b/Dockerfile.ruby-2.1-phantomjs2 deleted file mode 100644 index 9868f32..0000000 --- a/Dockerfile.ruby-2.1-phantomjs2 +++ /dev/null @@ -1,8 +0,0 @@ -FROM ruby:2.1 - -ENV PACKAGES="git-core" \ - LC_ALL=en_US.UTF-8 - -ADD / / -RUN /scripts/install-essentials -RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.2 b/Dockerfile.ruby-2.2 index d0e1760..46fcdd2 100644 --- a/Dockerfile.ruby-2.2 +++ b/Dockerfile.ruby-2.2 @@ -1,14 +1,8 @@ FROM ruby:2.2 -ENV PACKAGES="git-core" +ENV PACKAGES="git-core" \ + LC_ALL=en_US.UTF-8 ADD / / RUN /scripts/install-essentials - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -RUN /scripts/install-phantomjs +RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.2-gitlab-8.11 b/Dockerfile.ruby-2.2-gitlab-8.11 new file mode 100644 index 0000000..d0e1760 --- /dev/null +++ b/Dockerfile.ruby-2.2-gitlab-8.11 @@ -0,0 +1,14 @@ +FROM ruby:2.2 + +ENV PACKAGES="git-core" + +ADD / / +RUN /scripts/install-essentials + +# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ +# Must be set after install-essentials is run +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN /scripts/install-phantomjs diff --git a/Dockerfile.ruby-2.2-phantomjs2 b/Dockerfile.ruby-2.2-phantomjs2 deleted file mode 100644 index 46fcdd2..0000000 --- a/Dockerfile.ruby-2.2-phantomjs2 +++ /dev/null @@ -1,8 +0,0 @@ -FROM ruby:2.2 - -ENV PACKAGES="git-core" \ - LC_ALL=en_US.UTF-8 - -ADD / / -RUN /scripts/install-essentials -RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.3 b/Dockerfile.ruby-2.3 index 6f649c8..02be75b 100644 --- a/Dockerfile.ruby-2.3 +++ b/Dockerfile.ruby-2.3 @@ -1,14 +1,8 @@ -FROM ruby:2.3.1 +FROM ruby:2.3 -ENV PACKAGES="git-core" +ENV PACKAGES="git-core" \ + LC_ALL=en_US.UTF-8 ADD / / RUN /scripts/install-essentials - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -RUN /scripts/install-phantomjs +RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.3-gitlab-8.11 b/Dockerfile.ruby-2.3-gitlab-8.11 new file mode 100644 index 0000000..6f649c8 --- /dev/null +++ b/Dockerfile.ruby-2.3-gitlab-8.11 @@ -0,0 +1,14 @@ +FROM ruby:2.3.1 + +ENV PACKAGES="git-core" + +ADD / / +RUN /scripts/install-essentials + +# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ +# Must be set after install-essentials is run +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN /scripts/install-phantomjs diff --git a/Dockerfile.ruby-2.3-phantomjs2 b/Dockerfile.ruby-2.3-phantomjs2 deleted file mode 100644 index 02be75b..0000000 --- a/Dockerfile.ruby-2.3-phantomjs2 +++ /dev/null @@ -1,8 +0,0 @@ -FROM ruby:2.3 - -ENV PACKAGES="git-core" \ - LC_ALL=en_US.UTF-8 - -ADD / / -RUN /scripts/install-essentials -RUN /scripts/install-phantomjs 2.1.1 From d5cecaa7dccca3bb3f81725e932b6b00cd6d21f6 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Thu, 22 Sep 2016 16:56:56 +0300 Subject: [PATCH 3/4] Start versioning images based on dependency versions Also this removes the Ruby 2.2 images we don't use anyway. --- .gitlab-ci.yml | 13 ++++--------- ....1 => Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 | 6 ++++++ Dockerfile.ruby-2.1-gitlab-8.11 | 14 -------------- Dockerfile.ruby-2.2 | 8 -------- Dockerfile.ruby-2.2-gitlab-8.11 | 14 -------------- ....3 => Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 | 6 ++++++ Dockerfile.ruby-2.3-gitlab-8.11 | 14 -------------- 7 files changed, 16 insertions(+), 59 deletions(-) rename Dockerfile.ruby-2.1 => Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 (52%) delete mode 100644 Dockerfile.ruby-2.1-gitlab-8.11 delete mode 100644 Dockerfile.ruby-2.2 delete mode 100644 Dockerfile.ruby-2.2-gitlab-8.11 rename Dockerfile.ruby-2.3 => Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 (53%) delete mode 100644 Dockerfile.ruby-2.3-gitlab-8.11 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d31de45..7814290 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,15 +27,10 @@ before_script: only: - master -ruby-2.1 test: *test_build -ruby-2.2 test: *test_build -ruby-2.3 test: *test_build +ruby-2.1-git-2.7-phantomjs-2.1 test: *test_build +ruby-2.3-git-2.7-phantomjs-2.1 test: *test_build www-gitlab-com test: *test_build -ruby-2.1: *build_and_deploy -ruby-2.1-phantomjs2: *build_and_deploy -ruby-2.2: *build_and_deploy -ruby-2.2-phantomjs2: *build_and_deploy -ruby-2.3: *build_and_deploy -ruby-2.3-phantomjs2: *build_and_deploy +ruby-2.1-git-2.7-phantomjs-2.1: *build_and_deploy +ruby-2.3-git-2.7-phantomjs-2.1: *build_and_deploy www-gitlab-com: *build_and_deploy diff --git a/Dockerfile.ruby-2.1 b/Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 similarity index 52% rename from Dockerfile.ruby-2.1 rename to Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 index 9868f32..5cb6855 100644 --- a/Dockerfile.ruby-2.1 +++ b/Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 @@ -6,3 +6,9 @@ ENV PACKAGES="git-core" \ ADD / / RUN /scripts/install-essentials RUN /scripts/install-phantomjs 2.1.1 +RUN /scripts/install-git + +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/Dockerfile.ruby-2.1-gitlab-8.11 b/Dockerfile.ruby-2.1-gitlab-8.11 deleted file mode 100644 index 35cd5f1..0000000 --- a/Dockerfile.ruby-2.1-gitlab-8.11 +++ /dev/null @@ -1,14 +0,0 @@ -FROM ruby:2.1 - -ENV PACKAGES="git-core" - -ADD / / -RUN /scripts/install-essentials - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -RUN /scripts/install-phantomjs diff --git a/Dockerfile.ruby-2.2 b/Dockerfile.ruby-2.2 deleted file mode 100644 index 46fcdd2..0000000 --- a/Dockerfile.ruby-2.2 +++ /dev/null @@ -1,8 +0,0 @@ -FROM ruby:2.2 - -ENV PACKAGES="git-core" \ - LC_ALL=en_US.UTF-8 - -ADD / / -RUN /scripts/install-essentials -RUN /scripts/install-phantomjs 2.1.1 diff --git a/Dockerfile.ruby-2.2-gitlab-8.11 b/Dockerfile.ruby-2.2-gitlab-8.11 deleted file mode 100644 index d0e1760..0000000 --- a/Dockerfile.ruby-2.2-gitlab-8.11 +++ /dev/null @@ -1,14 +0,0 @@ -FROM ruby:2.2 - -ENV PACKAGES="git-core" - -ADD / / -RUN /scripts/install-essentials - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -RUN /scripts/install-phantomjs diff --git a/Dockerfile.ruby-2.3 b/Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 similarity index 53% rename from Dockerfile.ruby-2.3 rename to Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 index 02be75b..a51c43b 100644 --- a/Dockerfile.ruby-2.3 +++ b/Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 @@ -6,3 +6,9 @@ ENV PACKAGES="git-core" \ ADD / / RUN /scripts/install-essentials RUN /scripts/install-phantomjs 2.1.1 +RUN /scripts/install-git + +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/Dockerfile.ruby-2.3-gitlab-8.11 b/Dockerfile.ruby-2.3-gitlab-8.11 deleted file mode 100644 index 6f649c8..0000000 --- a/Dockerfile.ruby-2.3-gitlab-8.11 +++ /dev/null @@ -1,14 +0,0 @@ -FROM ruby:2.3.1 - -ENV PACKAGES="git-core" - -ADD / / -RUN /scripts/install-essentials - -# Set UTF-8 http://jaredmarkell.com/docker-and-locales/ -# Must be set after install-essentials is run -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 - -RUN /scripts/install-phantomjs From d0830864e314e123daa9d9138a9f711358a0eb7a Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Fri, 23 Sep 2016 19:36:09 +0300 Subject: [PATCH 4/4] Install git from Debian strech sources --- Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 | 4 ---- Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 | 4 ---- scripts/install-essentials | 5 ++++- scripts/install-git | 15 --------------- 4 files changed, 4 insertions(+), 24 deletions(-) delete mode 100755 scripts/install-git diff --git a/Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 b/Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 index 5cb6855..f6d9186 100644 --- a/Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 +++ b/Dockerfile.ruby-2.1-git-2.7-phantomjs-2.1 @@ -1,12 +1,8 @@ FROM ruby:2.1 -ENV PACKAGES="git-core" \ - LC_ALL=en_US.UTF-8 - ADD / / RUN /scripts/install-essentials RUN /scripts/install-phantomjs 2.1.1 -RUN /scripts/install-git RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 diff --git a/Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 b/Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 index a51c43b..4241ed6 100644 --- a/Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 +++ b/Dockerfile.ruby-2.3-git-2.7-phantomjs-2.1 @@ -1,12 +1,8 @@ FROM ruby:2.3 -ENV PACKAGES="git-core" \ - LC_ALL=en_US.UTF-8 - ADD / / RUN /scripts/install-essentials RUN /scripts/install-phantomjs 2.1.1 -RUN /scripts/install-git RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 diff --git a/scripts/install-essentials b/scripts/install-essentials index 0d17128..eeaaa52 100755 --- a/scripts/install-essentials +++ b/scripts/install-essentials @@ -11,7 +11,10 @@ apt-get install -y \ libxslt-dev libcurl4-openssl-dev libicu-dev \ logrotate python-docutils pkg-config cmake nodejs \ libkrb5-dev postgresql-client mysql-client unzip \ - $PACKAGES + +echo deb http://httpredir.debian.org/debian stretch main > /etc/apt/sources.list +apt-get update -yqqq +apt-get install -yqq --force-yes git # Set UTF-8 # http://stackoverflow.com/a/3182519/2137281 diff --git a/scripts/install-git b/scripts/install-git deleted file mode 100755 index 5a14926..0000000 --- a/scripts/install-git +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -xeo pipefail - -cd /tmp -wget https://www.kernel.org/pub/software/scm/git/git-2.7.4.tar.gz -echo '7104c4f5d948a75b499a954524cb281fe30c6649d8abe20982936f75ec1f275b git-2.7.4.tar.gz' | shasum -a256 -c - -tar -xzf git-2.7.4.tar.gz - -cd git-2.7.4/ -./configure -make prefix=/usr/local all - -cd / -rm -rf /tmp/*