gegedesembri/php
This image is created based on the minimum requirements of WHMCS.
Building from php:7.3-apache based on WHMCS 7.10
Building from php:7.4-apache based on WHMCS 8.4
You can see the PHP Version Support Matrix for WHMCS.
However, its use is not only limited to WHMCS, this image can also be used as a webserver as usual with the addition of a few minimum WHMCS extensions. If you need to add some extensions that you need, then you can refer to the php docker image instructions.
Extension Added :
Curl
ionCube Loader
GD2 Image Library
JSON Support
PDO MySQL
XML
Iconv
MBString
GMP
OpenSSL
BC Math
Intl
Fileinfo
Soap
XMLrpc
ZIP
Docker Compose or Stack
Docker Compose use PHP Apache Webserver, MariaDB, and PHPMyAdmin
version: '3.7'
services:
php-httpd:
image: gegedesembri/php:7.3-apache # You can change TAG for select version
environment:
PHP_TIMEZONE: "Asia/Jakarta"
ports:
- 80:80
volumes:
- /var/www/docker-php-apache:/var/www/html
mariadb:
image: mariadb:10.6.8
volumes:
- vol-mariadb:/var/lib/mysql
- /data/docker-mariadb-init:/docker-entrypoint-initdb.d
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "no"
MYSQL_ROOT_PASSWORD: "ChangeThisWithYourPassword"
MYSQL_USER: "ChangeThisWithYourUsername"
MYSQL_PASSWORD: "ChangeThisWithYourPassword"
MYSQL_DATABASE: "whmcs_db" # Please don't use database name "mysql"
phpmyadmin:
image: phpmyadmin
restart: always
links:
- mariadb:db
ports:
- 8181:80
volumes:
vol-mariadb:
WHMCS File
You can upload the WHMCS file in the directory : /var/www/docker-php-apache
Multiple Database in One Server
You can create multiple database in one server MariaDB with SQL Script.
Copy and paste the code below, enter it in the file /data/docker-mariadb-init/01-multidb.sql
CREATE DATABASE IF NOT EXISTS `db-one`;
GRANT ALL ON `db-one`.* TO 'username'@'%';
CREATE DATABASE IF NOT EXISTS `db-two`;
GRANT ALL ON `db-two`.* TO 'username'@'%';
change db-one
or db-two
according to the database name you want. Adjust the username
with the MYSQL_USER
you specified in Docker Compose or Stack and recreate your Container
docker pull gegedesembri/php