This repository is used to create Docker images for running PHP CLI commands.
Install the pseiffert/php-cli container (optional - this step is performed by Docker automatically when running the container):
$ docker pull pseiffert/php-cli
Define an bash alias that runs this container whenever composer is invoked on the command line:
$ echo "alias php='docker run --rm -it -v \$(pwd):/opt pseiffert/php-cli'" >> ~/.bashrc
$ source ~/.bashrc
Run PHP as always:
$ php -i
Content type
Image
Digest
sha256:f718b3b49…
Size
90.8 MB
Last updated
almost 11 years ago
docker pull pseiffert/php-cli