Create image used for CI testing

This commit is contained in:
Deon George 2021-06-15 22:43:34 +10:00
parent 5c1de20bd9
commit abe19134e8
2 changed files with 26 additions and 0 deletions

View File

@ -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

12
Dockerfile.phptest Normal file
View File

@ -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/*