Public | Automated Build

Last pushed: 3 months ago
Short Description
Docker image providing php testing tools, and related plugins and configs
Full Description

Docker Image - Test - Php



:exclamation: Report issues and send Pull Requests in the main Docker Images repository :exclamation:

Introduction

Provides php testing tools, and related plugins and configs.

  • PHP
    • Extensions: calendar
  • PHPUnit

Provides also useful development tools.

  • Goss
  • Make
  • Git

Permissions

Docker container runs commands as a "lint" user, to which you can define id
and group id using USER_ID and GROUP_ID environment variables
(1000:1000 by default).

Integration

PHP-CS-Fixer

Run

DIR=`pwd`; docker run \
  --rm \
  --interactive \
  --volume $DIR:$DIR \
  --workdir $DIR \
  --env USER_ID=`id -u` \
  --env GROUP_ID=`id -g` \
  manala/lint-php \
  php-cs-fixer --help

Zsh function

php-cs-fixer() {
  DIR=`pwd`
  docker run \
    --rm \
    --interactive \
    --volume $DIR:$DIR \
    --workdir $DIR \
    --env USER_ID=`id -u` \
    --env GROUP_ID=`id -g` \
    manala/lint-php \
    php-cs-fixer "$@"
}

Zsh alias

alias php-cs-fixer='f() {
  DIR=`pwd`
  docker run \
    --rm \
    --interactive \
    --volume $DIR:$DIR \
    --workdir $DIR \
    --env USER_ID=`id -u` \
    --env GROUP_ID=`id -g` \
    manala/lint-php \
    php-cs-fixer "$@"
};f'

Script /usr/local/bin/php-cs-fixer

#!/bin/sh

DIR=`pwd`
docker run \
  --rm \
  --interactive \
  --volume $DIR:$DIR \
  --workdir $DIR \
  --env USER_ID=`id -u` \
  --env GROUP_ID=`id -g` \
  manala/lint-php \
  php-cs-fixer "$@"

Development

Requirements:

  • Docker
  • Make

Build

make build

Dev

make dev

Test

make test

Updates:

  • Check for new docker alpine node image version and update Dockerfile and goss.yaml accordingly
  • Check for new goss release and update Dockerfile accordingly
  • Check for new composer release and update Dockerfile and goss.yaml accordingly
  • Check for new composer packages versions and update Dockerfile and goss.yaml accordingly
Docker Pull Command
Owner
manala
Source Repository

Comments (0)