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.
- Image based on: alpine
- Supported architectures:
linux/amd64
,linux/arm64
- Maintained by: grmvoid
- Issues: https://github.com/grmvoid/docker-php/issues
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.
Additionally, the contents of this repository are licensed under the MIT License.