[READ-ONLY] Docker image providing php testing tools, and related plugins and configs
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
hooks
.travis.yml
CHANGELOG.md
Dockerfile
Makefile
README.md
entrypoint.sh
goss.yaml

README.md

Docker Image - Test - Php Build Status

Docker Stars Docker Pulls Docker Automated buil

❗️ Report issues and send Pull Requests in the main Docker Images repository ❗️

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