Sign inSign up

cnbbx/php7-fpm

By cnbbx

•Updated almost 5 years ago

国人编译 php7.3 GD Redis MongoDB XDebug opcache fpm

Image
0

1.6K

cnbbx/php7-fpm repository overview

⁠How to use this image

⁠Create a Dockerfile in your PHP project
FROM cnbbx/php7-fpm
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 cnbbx/php7-fpm php your-script.php

Tag summary

Content type

Image

Digest

Size

43 MB

Last updated

almost 5 years ago

docker pull cnbbx/php7-fpm