A PHP 5.4.45 alpine image refer to official PHP 5.5.34 alpine Dockerfile.
3.1K
A PHP 5.4.45 alpine image refer to official PHP 5.5.34 alpine Dockerfile.
Create a Dockerfile in your PHP project
FROM yeszao/php:5.4.45-fpm-alpine
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
Run a single PHP script For many simple, single file projects, you may find it inconvenient to write a complete Dockerfile. In such cases, you can run a PHP script by using the PHP Docker image directly:
$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp yeszao/php:5.4.45-fpm-alpine php your-script.php
Content type
Image
Digest
Size
27.7 MB
Last updated
about 7 years ago
docker pull yeszao/php:5.4.45-fpm-alpine