grmvoid/php
PHP is a general-purpose scripting language geared towards web development.
580
A lightweight PHP container image based on Alpine Linux, building with the Clang and LLVM. It supports multiple architectures and is ideal for both development and production environments.
linux/amd64
, linux/arm64
To get started, pull the specify a version PHP image:
docker pull grmvoid/php:8.4.4
You can run the PHP container interactively using the following command:
docker run -it --name php -v /path/to/app:app grmvoid:php:8.4.4
To execute a PHP script inside the container:
docker run --rm -v $(pwd):/app -w /app grmvoid/php:8.4.4 php script.php
You can extend this image in your Dockerfile
:
FROM grmvoid/php:8.4.4
WORKDIR /app
COPY . .
CMD ["php", "index.php"]
The php image uses several environment variables which are easy to miss.
Variable | Default Value | Description |
---|---|---|
PHPIZE_DEPS | Dependencies required for PHP extensions |
This repository follows the PHP License. Individual dependencies may have their own licensing terms.
docker pull grmvoid/php