huedawn/php-ext

By huedawn

Updated 11 months ago

Extend official PHP docker image with mysqli, intl, and zip.

Image
Languages & Frameworks
Web Servers
Developer Tools

10K+

README

This is how to use this image. There are two ways to use this image, as an Apache Web Server, or as a CLI script runner. Make sure to use the appropriate tag of the image.

Index:

  1. Apache
  2. CLI

Apache

Using in Docker Image

Dockerfile:

FROM huedawn/php-ext:latest-apache
LABEL Name=my-apache-app Version=0.0.1
COPY "${PWD}" /var/www/html
Using in Docker Compose

compose.yaml:

name: my-apache-app

services:
  home:
    image: huedawn/php-ext:latest-apache
    volumes:
      - type: bind
        source: "$PWD"
        target: /var/www/html
    ports:
      - "80:80"
Using in Terminal

prompt:

docker run -d -p 80:80 --name my-apache-app -v "$PWD":/var/www/html huedawn/php-ext:latest-apache

Top

CLI

Using in terminal

prompt:

docker run -it --rm --name my-php-script -v "$PWD":/usr/src/myphpapp -w /usr/src/myphpapp huedawn/php-ext:latest-cli php my-script.php

Top

Docker Pull Command

docker pull huedawn/php-ext