Lightweight php CLI based on alpine with frequents modules used by BiiG.
This image only contains the php CLI interpreter.
FROM biig/lightweight-php:latest
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD [ "php", "./your-script.php" ]
Then, run the commands to build and run the Docker image:
$ docker build -t my-php-app .
$ docker run -it --rm --name my-running-app my-php-app
$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp biig/lightweight-php:latest php your-script.php
$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp biig/lightweight-php:latest sh