commit d962df104e12bb59e62042e1444978ba037a75d0 Author: Deon George Date: Thu Dec 7 15:19:02 2017 +1100 Initial Release diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d26e0f4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,40 @@ +image: docker:latest + +stages: +- test +- build + +variables: + VERSION: 7.1-fpm-plus + DOCKER_IMAGE: leenooks/php + DOCKER_REGISTRY: registry.leenooks.net + DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375 + +services: +- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind + +before_script: +- docker info +- docker version +- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} + +test: + stage: test + script: + - cat /etc/hosts + - env|sort + - docker build -t ${DOCKER_IMAGE}:${VERSION} . + - docker images + only: + - debug + +build: + stage: build + script: + - docker build -t ${DOCKER_IMAGE}:${VERSION} . + - docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION} + - docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION} + tags: + - docker + only: + - master diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c6a7466 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +# NAME leenooks/php +# VERSION 7.1-fpm-plus + +FROM php:7.1-fpm +RUN echo "deb http://deb.debian.org/debian jessie non-free" >> /etc/apt/sources.list.d/non-free.list && apt-get update && apt-get install -y pkg-config libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev libsnmp-dev snmp-mibs-downloader \ + && download-mibs \ + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-install -j$(nproc) pdo_mysql bz2 gettext sockets gmp gd pcntl snmp