From 8e13b80a3ab903a8d27c0a3b5e563c9e4c002ce3 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Wed, 31 Jan 2018 13:35:52 -0500 Subject: [PATCH] Attempt to use lighter docker images for gitlab builds --- .gitlab-ci.yml | 6 +++--- build/docker_install.sh | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05311f3..dac3dac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ before_script: - php composer.phar install --ignore-platform-reqs services: - mysql:latest - - postgres:latest + - postgres:alpine variables: MYSQL_ROOT_PASSWORD: foo-bar-baz @@ -17,11 +17,11 @@ variables: POSTGRES_PASSWORD: test test:7.1: - image: php:7.1 + image: php:7.1-alpine script: - vendor/bin/phpunit -c build --no-coverage test:7.2: - image: php:7.2 + image: php:7.2-alpine script: - vendor/bin/phpunit -c build --no-coverage diff --git a/build/docker_install.sh b/build/docker_install.sh index 1dfad0e..4dc7858 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -9,8 +9,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" set -xe # Install git (the php image doesn't have it) which is required by composer -apt-get update -yqq -apt-get install git libpq-dev unzip -yqq +echo -e 'http://dl-cdn.alpinelinux.org/alpine/edge/main\nhttp://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories +apk add --no-cache \ + curl \ + git # Install phpunit, the tool that we will use for testing curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar