Sign inSign up

yeszao/php

By yeszao

Updated about 7 years ago

A PHP 5.4.45 alpine image refer to official PHP 5.5.34 alpine Dockerfile.

Image
1

3.1K

yeszao/php repository overview

A PHP 5.4.45 alpine image refer to official PHP 5.5.34 alpine Dockerfile.

How to use this image

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

Reference

Tag summary

Content type

Image

Digest

Size

27.7 MB

Last updated

about 7 years ago

docker pull yeszao/php:5.4.45-fpm-alpine