This image extends official PHP CLI image (php:{php_version}-cli-{debian_distro}) and adds a a number of PHP extensions and locales. The intended use for this repository is to provide a base image to run unit tests or other command line scripts.
Installed extensions: xdebug, intl, dom, xsl, gettext, mbstring, gmp, bcmath, zip, bz2, pcntl, sockets, fileinfo, opcache sodium
See available tags on docker hub: https://hub.docker.com/r/leadtech/php-cli/tags
docker run --rm -v $(PWD):/app -w /app --user=$(id -u):$(id -g) --env COMPOSER_AUTH=$COMPOSER_AUTH leadtech/php-cli:8.1 vendor/bin/phpunit Copy .env.dist to .env and configure environment variables.
- GNU Make
- Docker
Build and push images for all supported PHP versions:
make allBuild docker image
PHP_VERSION=... make buildPush docker image
PHP_VERSION=... make pushCombine the commands above:
PHP_VERSION=... make build push