grmvoid/php

By grmvoid

Updated 11 days ago

PHP is a general-purpose scripting language geared towards web development.

Image
Languages & Frameworks

580

PHP Docker Container Image

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.

Quick reference

Usage

Pull the Image

To get started, pull the specify a version PHP image:

  docker pull grmvoid/php:8.4.4
Running a Container

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
Running a PHP Script

To execute a PHP script inside the container:

  docker run --rm -v $(pwd):/app -w /app grmvoid/php:8.4.4 php script.php
Using as a Base Image

You can extend this image in your Dockerfile:

FROM grmvoid/php:8.4.4
WORKDIR /app
COPY . .
CMD ["php", "index.php"]

Environment Variables

The php image uses several environment variables which are easy to miss.

VariableDefault ValueDescription
PHPIZE_DEPSDependencies required for PHP extensions

LICENSE

This repository follows the PHP License. Individual dependencies may have their own licensing terms.

Docker Pull Command

docker pull grmvoid/php