Docker images with everything you'll need to build and test PHP applications.
Based on Official PHP images and edbizarro's Images
CURRENTLY ONLY ALPINE IMAGES!
8.4-node22-alpine
(php/node22/Dockerfile) -8.4-node20-alpine
(php/node20/Dockerfile) -8.4-node18-alpine
(php/node18/Dockerfile) -8.4-node16-alpine
(php/node16/Dockerfile) -8.3-node22-alpine
(php/node22/Dockerfile) -8.3-node20-alpine
(php/node20/Dockerfile) -8.3-node18-alpine
(php/node18/Dockerfile) -8.3-node16-alpine
(php/node16/Dockerfile) -8.2-node22-alpine
(php/node22/Dockerfile) -8.2-node20-alpine
(php/node20/Dockerfile) -8.2-node18-alpine
(php/node18/Dockerfile) -8.2-node16-alpine
(php/node16/Dockerfile) -8.1-node22-alpine
(php/node22/Dockerfile) -8.1-node20-alpine
(php/node20/Dockerfile) -8.1-node18-alpine
(php/node18/Dockerfile) -8.1-node16-alpine
(php/node16/Dockerfile) -8.0-node20-alpine
(php/node20/Dockerfile) -8.0-node18-alpine
(php/node18/Dockerfile) -8.0-node16-alpine
(php/node16/Dockerfile) -7.4-node18-alpine
(php7/node18/Dockerfile) -7.4-node16-alpine
(php7/node16/Dockerfile) -7.4-node14-alpine
(php7/node14/Dockerfile) -
All latest versions come with:
Alternative versions available with:
variables:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: symfony
MYSQL_PASSWORD: password
MYSQL_DATABASE: project
APP_ENV: prod
DATABASE_URL: mysql://$MYSQL_USER:$MYSQL_PASSWORD@mysql/$MYSQL_DATABASE
image: cstadler333/gitlab-ci-php:8.3-alpine
services:
- mariadb:10.11
build:
stage: build
before_script:
- npm install
script:
- npm run build
- composer install --prefer-dist --no-ansi --no-interaction --no-progress
stages:
- build
- deploy
variables:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: symfony
MYSQL_PASSWORD: password
MYSQL_DATABASE: project
APP_ENV: prod
DATABASE_URL: mysql://$MYSQL_USER:$MYSQL_PASSWORD@mysql/$MYSQL_DATABASE
cache:
key: $CI_COMMIT_REF_NAME
paths:
- node_modules/
- vendor/
image: cstadler333/gitlab-ci-php:8.3-alpine
services:
- mariadb:10.11
.build_template: &build
stage: build
before_script:
- npm install --force
script:
- npm run build
- composer install --prefer-dist --no-ansi --no-interaction --no-progress
.deploy_template: &deploy
stage: deploy
before_script:
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
Build Master:
<<: *build
only:
- master
Deploy Master:
<<: *deploy
only:
- master
script:
- rsync -a --progress --human-readable --delete
--exclude .git
--exclude node_modules
--exclude var
--exclude vendor
.
user@server:path