From abe19134e8ead7e383411f4bc7c85557f5045853 Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 15 Jun 2021 22:43:34 +1000 Subject: [PATCH] Create image used for CI testing --- .gitlab-ci.yml | 14 ++++++++++++++ Dockerfile.phptest | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile.phptest diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9fc40f0..657118e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: docker:latest stages: - test - build +- build-test variables: BRANCH: ext @@ -41,3 +42,16 @@ x86_64:build: - x86_64 only: - ext + +x86_64:build-test: + stage: build-test + script: + - if [ -f init ]; then chmod 500 init; fi + - ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || true + - docker build --file Dockerfile.phptest --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION}-test . + - docker push ${CI_REGISTRY_IMAGE}:${VERSION}-test + tags: + - docker + - x86_64 + only: + - ext diff --git a/Dockerfile.phptest b/Dockerfile.phptest new file mode 100644 index 0000000..fb8181d --- /dev/null +++ b/Dockerfile.phptest @@ -0,0 +1,12 @@ +# NAME leenooks/php +# VERSION 8.0-fpm-test + +FROM registry.leenooks.net/leenooks/php:8.0-fpm-mp + +RUN pecl install xdebug \ + && docker-php-ext-enable xdebug + +RUN apt-get update && apt-get install -y npm \ + && apt-get -y autoremove \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*