Skip to content

MilesPong/docker-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP with Extensions

This PHP image is based on official php:alpine image with additional extensions support.

Supported tags

Extensions

From source of Dockerfile:

  • mysqli
  • pdo_mysql
  • zip
  • opcache
  • gd

Result:

$ docker run --rm milespeng/php:$tag php -m
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

ARG

Name Description Default
ALPINE_URL Alpine mirror dl-cdn.alpinelinux.org
TZ Timezone UTC

ENV

Key Description Example
TZ Timezone UTC

Docker compose

Now we use php as a seperate docker service via docker compose. Since the external named network is defined, it's easy to 'join' with other docker services such as nginx, mysql and so on.

From the beginning, prepare some config file as follow,

cp 7.2/config/templates/php.ini.production 7.2/config/php.ini
cp 7.2/config/templates/php-fpm.conf.default 7.2/config/php-fpm.conf
cp 7.2/config/templates/www.conf.default 7.2/config/www.conf

Then modify above files depends on your condition.

cp .env.example .env
docker network create frontend-network
docker network create backend-network
docker-compose up -d

About

Docker image for PHP with extensions support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published