From 74afe07a7b9e4efc0480ba89785144aea4d70342 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 23 Aug 2020 12:54:50 +1000 Subject: [PATCH] Add building additional test container --- .gitlab-ci.yml | 14 ++++++++++++++ Dockerfile.phptest | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100755 Dockerfile.phptest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e1e980..d7decba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: docker:latest stages: - test - build +- build-test variables: BRANCH: mp @@ -41,3 +42,16 @@ x86_64:build: - x86_64 only: - mysql + +x86_64:build-test: + stage: build-test + script: + - if [ -f init ]; then chmod 500 init; fi + - ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || echo "true" + - docker build --file Docker.phptest --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . + - docker push ${CI_REGISTRY_IMAGE}:${VERSION}-test + tags: + - docker + - x86_64 + only: + - mysql diff --git a/Dockerfile.phptest b/Dockerfile.phptest new file mode 100755 index 0000000..479cf5e --- /dev/null +++ b/Dockerfile.phptest @@ -0,0 +1,12 @@ +# NAME leenooks/php +# VERSION 7.4-fpm-mp + +FROM registry.leenook.net/leenooks/php:7.4-fpm + +RUN apt-get update && apt-get install -y autoconf \ + && pecl install xdebug \ + && docker-php-ext-enable xdebug \ + && apt-get purge autoonf \ + && apt-get -y autoremove \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \