Switching builds to include PHP version to limit memory requirements on deploy.
Some checks failed
Cloud Apache Container / Build-and-Push (74) (push) Failing after 56s
Cloud Apache Container / Build-and-Push (80) (push) Failing after 36s
Cloud Apache Container / Build-and-Push (81) (push) Failing after 56s
Cloud Apache Container / Build-and-Push (82) (push) Failing after 55s
Cloud Apache Container / Build-and-Push (83) (push) Failing after 40s
Cloud Apache Container / Build-and-Push (84) (push) Failing after 57s
Some checks failed
Cloud Apache Container / Build-and-Push (74) (push) Failing after 56s
Cloud Apache Container / Build-and-Push (80) (push) Failing after 36s
Cloud Apache Container / Build-and-Push (81) (push) Failing after 56s
Cloud Apache Container / Build-and-Push (82) (push) Failing after 55s
Cloud Apache Container / Build-and-Push (83) (push) Failing after 40s
Cloud Apache Container / Build-and-Push (84) (push) Failing after 57s
improve build size and speed for images.
This commit is contained in:
14
README.md
14
README.md
@@ -6,6 +6,14 @@ This is a base container for running PHP-based applications, supporting multiple
|
||||
|
||||
---
|
||||
|
||||
## What's New?
|
||||
|
||||
- **Optimized Image:** The Dockerfile has been refactored for smaller size, faster builds, and improved security. Unnecessary files and caches are removed during build.
|
||||
- **Pre-built Images for Each PHP Version:** On every push, images for all supported PHP versions are built and pushed to the registry. You can pull the exact version you need (e.g., `cac:php74`, `cac:php84`, or `cac:latest`).
|
||||
- **.dockerignore Added:** The build context is now minimized, making builds faster and more secure.
|
||||
|
||||
---
|
||||
|
||||
## Quick Start: Local Development with `local-dev.sh`
|
||||
|
||||
The easiest way to start a local development environment is with the provided `local-dev.sh` script. This script automates container setup, volume creation, log directories, and WordPress installation.
|
||||
@@ -79,6 +87,8 @@ Then visit https://localhost (accept the SSL warning) to complete setup.
|
||||
## Features
|
||||
|
||||
- **Multiple PHP Versions:** 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 (set with `PHPVER` or `-a` flag)
|
||||
- **Pre-built Images:** Pull the image for your desired PHP version directly from the registry. No need to build locally unless customizing.
|
||||
- **Optimized Build:** Smaller, faster, and more secure images thanks to the improved Dockerfile and `.dockerignore`.
|
||||
- **Automatic Database Setup:** MariaDB is started in DEV mode, credentials are auto-generated and stored in `/home/$user/mysql_creds`.
|
||||
- **Database Backups:** Cron job backs up the database every 15 minutes to `/home/$user/_db_backups`.
|
||||
- **Log Management:** Log rotation compresses logs older than 3 days and deletes those older than 7 days.
|
||||
@@ -119,4 +129,6 @@ Then visit https://localhost (accept the SSL warning) to complete setup.
|
||||
## Troubleshooting
|
||||
- The first run may take several minutes as dependencies are installed.
|
||||
- If you need to change PHP version, stop and remove the container, then recreate with the desired version.
|
||||
- For advanced configuration, see the scripts in the `scripts/` directory.
|
||||
- For advanced configuration, see the scripts in the `scripts/` directory.
|
||||
- The image is optimized for size and speed, but local development in DEV mode may install additional packages (MariaDB, memcached) at runtime using microdnf.
|
||||
- The build context is minimized by the included `.dockerignore` file.
|
Reference in New Issue
Block a user