Skip to content

Eworkssk/docker-php-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP CLI Docker Image

Docker Stars Docker Pulls Docker Image Size (tag) Docker Image Version

Automatic weekly updates

⚡ PHP 8.0, 8.1, 8.2, 8.3 and 8.4 now available for both linux/amd64 and linux/arm64/v8

💡 Do you need PHP FPM instead? Check out our eworkssk/php-fpm image.

Pull

docker pull eworkssk/php-cli:latest

or for use in production environment:

docker pull eworkssk/php-cli:8.4

Usage

You don't have to pass the executable name as part of the command, only parameters. By default, image executes this command: php -m.

docker run --rm eworkssk/php-cli

To run a custom script, simply mount it into /scripts and run it!

docker run -v $(pwd):/scripts --rm eworkssk/php-cli script.php

If you need, you can override the default entrypoint:

docker run --entrypoint /path/to/executable --rm eworkssk/php-cli

Optionally, pass volume for opcache:

docker run -v my_dir:/tmp --rm eworkssk/php-cli

Configuration

PHP configuration located at /usr/local/etc/php/

List of installed PHP extensions

[PHP Modules]
bcmath
bz2
calendar
Core
csv
ctype
curl
date
decimal
dom
exif
fileinfo
filter
ftp
gd
geospatial
gettext
gnupg
hash
http
iconv
imagick
imap
inotify
intl
json
libxml
mbstring
mysqli
mysqlnd
oci8
openssl
pcre
PDO
pdo_mysql
PDO_OCI
pdo_sqlite
Phar
posix
raphf
readline
redis
Reflection
session
SimpleXML
soap
sockets
sodium
SPL
sqlite3
ssh2
standard
tokenizer
vips
xml
xmlreader
xmlwriter
yaml
Zend OPcache
zip
zlib
zstd

[Zend Modules]
Zend OPcache

List of installed additional software

curl
git
ghostscript
jq
poppler-utils
rclone
ssh
unzip
zip
xz-utils