4 Lights Consulting
Dockerhub: https://hub.docker.com/r/4lights/phpcontainer Git Repo: https://git.4lt.ca/4lt/phpcontainer
This repository provides a production-ready Docker container for running PHP with Apache. It comes pre-configured with the necessary PHP extensions, Apache modules, and is optimized for Novaconium Framework.
Features
- PHP Version: 8.4.5
- Apache Web Server: Configured to run PHP applications
- Enabled Apache Modules:
expires
headers
rewrite
remoteip
socache_shmcb
ssl
- PHP Extensions:
mysqli
pdo_mysql
pdo_pgsql
pgsql
pdo_sqlite
sqlite3
gd
intl
zip
opcache
bcmath
- Redis (via PECL)
- Email Setup: Configured to use msmtp for sending emails
- Timezone: Default set to Vancouver (
America/Vancouver
) - PHP Session Storage: Supports Redis as the default, with fallback to file-based sessions
Getting Started
Follow these steps to set up the PHP container on your local environment.
Prerequisites
- Docker
- Docker Compose is recommended
- Alternatively Podman is supported
Usage
Clone the Repository
git clone https://git.4lt.ca/4lt/phpcontainer.git
cd phpcontainer
docker build -t php-apache-container .
How to update on dockerhub
sudo su
docker buildx build --no-cache -t 4lights/phpcontainer:6.0.0 -t 4lights/phpcontainer:latest --load .
docker login
docker push 4lights/phpcontainer:6.0.0
docker push 4lights/phpcontainer:latest
References And Notes
Test using test.php
Description
v6.0.0
Latest
Languages
PHP
67.4%
Dockerfile
32.6%