Skip to content

Latest commit

 

History

History
231 lines (207 loc) · 13.6 KB

README.md

File metadata and controls

231 lines (207 loc) · 13.6 KB

General purpose PHP images for Docker

These images are based on the official PHP image.

These images install php extensions using Easy installation of PHP extensions in official PHP Docker images

Container Info

Default nginx port: 8080
Default fpm port: 9000

Available versions

Updated every sunday.

Updated every first day of the month.

Installed extensions

Extensão 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4
amqp
apcu
apcu_bc
ast
bcmath
bitset
blackfire
bz2
calendar
cassandra
cmark
csv
dba
ddtrace
decimal
ds
enchant
ev
event
excimer
exif
ffi
gd
gearman
geoip
geos
geospatial
gettext
gmagick
gmp
gnupg
grpc
http
igbinary
imagick
imap
inotify
interbase
intl
ion
ioncube_loader
jsmin
json_post
jsonpath
ldap
luasandbox
lz4
lzf
mailparse
maxminddb
mcrypt
memcache
memcached
memprof
mongo
mongodb
mosquitto
msgpack
mssql
mysql
mysqli
oauth
oci8
odbc
opcache
opencensus
openswoole
opentelemetry
parallel
parle
pcntl
pcov
pdo_dblib
pdo_firebird
pdo_mysql
pdo_oci
pdo_odbc
pdo_pgsql
pdo_sqlsrv
pgsql
php_trie
pq
propro
protobuf
pspell
pthreads
raphf
rdkafka
recode
redis
relay
shmop
simdjson
smbclient
snappy
snmp
soap
sockets
sodium
solr
sourceguardian
spx
sqlsrv
ssh2
stomp
swoole
sybase_ct
sysvmsg
sysvsem
sysvshm
tensor
tidy
timezonedb
uopz
uploadprogress
uuid
vips
wddx
xdebug
xdiff
xhprof
xlswriter
xmldiff
xmlrpc
xsl
yac
yaml
yar
zephir_parser
zip
zmq
zookeeper
zstd

Usage

Example with CLI:

docker run -it --rm -v "$PWD":/app aronpc/php:latest-fpm php
version: '3'
services:
  web:
    image: aronpc/php:latest-nginx
    working_dir: /app
    volumes:
      - ./:/app

ZSH php/composer alias

alias d-php="_php"
alias d-composer="_composer"

# using password and group files
# --volume /etc/passwd:/etc/passwd:ro
# --volume /etc/group:/etc/group:ro

# Set current user and group (solve permissions)
# --user $UID:$GID

# setting ssh agent to container (using 1password on example)
# --volume $HOME/.1password/agent.sock:/ssh-auth.sock
# --env SSH_AUTH_SOCK=/ssh-auth.sock

# mounting current dir as home of container and set workdir
# --volume $PWD:$PWD
# -w $PWD

# pass $argv to use console command

_php(){
	docker run --rm --interactive --tty \
	  --volume /etc/passwd:/etc/passwd:ro \
	  --volume /etc/group:/etc/group:ro \
	  --user $UID:$GID \
 	  --volume $PWD:$PWD \
	  -w $PWD\
	  aronpc/php:latest-fpm php $argv
}

_composer(){
	docker run --rm --interactive --tty \
	  --volume /etc/passwd:/etc/passwd:ro \
	  --volume /etc/group:/etc/group:ro \
	  --user $UID:$GID \
 	  --volume $PWD:$PWD \
	  -w $PWD\
	  aronpc/php:latest-fpm composer $argv
}