php version 8.4.5 debian rebuild v6

This commit is contained in:
2025-03-15 00:38:49 -07:00
parent 125e461786
commit c8021f204d
8 changed files with 350 additions and 236 deletions

View File

@@ -1,32 +1,68 @@
# 4 Lights Consulting
The apache php docker container that 4 Lights uses for production.
Dockerhub: https://hub.docker.com/r/4lights/phpcontainer
Git Repo: https://git.4lt.ca/4lt/phpcontainer
## How to update
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](https://git.4lt.ca/4lt/novaconium).
1. Clone the project: ```git clone git@git.4lt.ca:4lt/phpcontainer.git```
2. Update the Dockerfile.
3. Build (be sure to change the version number)
## 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
1. Docker
2. Docker Compose is recommended
3. Alternatively Podman is supported
### Usage
#### Clone the Repository
```bash
git clone https://git.4lt.ca/4lt/phpcontainer.git
cd phpcontainer
docker build -t php-apache-container .
```
## How to update on dockerhub
```bash
sudo su
docker buildx build --no-cache -t 4lights/phpcontainer:5.0.1 -t 4lights/phpcontainer:latest --load .
docker buildx build --no-cache -t 4lights/phpcontainer:6.0.0 -t 4lights/phpcontainer:latest --load .
docker login
docker push 4lights/phpcontainer:5.0.1
docker push 4lights/phpcontainer:6.0.0
docker push 4lights/phpcontainer:latest
```
# References And Notes
* [Stack Overflow IMAP features](https://stackoverflow.com/questions/49854767/docker-php7-2-fpm-cant-install-imap-module)
* Joomla base used: f9a16bcbd8/4.3/php8.1/apache/Dockerfile
## Supported Software
* 4 Lights PHP Framework
## Samples included in Repo
There is a docker-compose, env-sample and php.ini included as sample data.
Test using test.php