PHPVER does not select the PHP version: say so, warn in DEV mode
The PHP version is the image tag (cac:phpNN); PHPVER was only a leftover default. README/CLAUDE.md now state that, that cac:latest is PHP 8.5 today (not 8.3), and fix the stale PHP_VER build arg name. In DEV mode only, entrypoint.sh and entrypoint-fpm.sh warn loudly at start if an explicitly set PHPVER does not match the image's PHP (new scripts/dev-mode.sh, sourced in DEV only). PROD is untouched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
ce9fd87183
commit
7d6a007ef9
5 files changed
+28
-168
No files matched your search
@@ -4,12 +4,14 @@ This is a base container for running PHP-based applications, supporting multiple
|
||||
|
||||
**You must have Docker or compatible containerization software running.**
|
||||
|
||||
**Which PHP version do I get? The image tag decides, nothing else.** `cac:php83` is PHP 8.3, `cac:php84` is 8.4, `cac:php85` is 8.5, and so on. `cac:latest` is the same image as `cac:php85`, so **`latest` = PHP 8.5 today** (not 8.3). The `PHPVER` environment variable does **not** switch the PHP version of a running container: `docker run -e PHPVER=83 cac:php85` still runs PHP 8.5. In DEV mode a `PHPVER` that does not match the image's PHP prints a warning at start.
|
||||
|
||||
---
|
||||
|
||||
## 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`).
|
||||
- **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`, which is PHP 8.5).
|
||||
- **.dockerignore Added:** The build context is now minimized, making builds faster and more secure.
|
||||
|
||||
---
|
||||
@@ -89,7 +91,7 @@ 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, 8.5, 8.6 (8.6: cac and cac-fpm only) (set with `PHPVER` or `-a` flag)
|
||||
- **Multiple PHP Versions:** 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6 (8.6: cac and cac-fpm only). Selected by the image tag (`cac:php84`) or the `-a` flag of `local-dev.sh`; `latest` = 8.5
|
||||
- **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`.
|
||||
@@ -112,7 +114,7 @@ Then visit https://localhost (accept the SSL warning) to complete setup.
|
||||
**Optional:**
|
||||
- `environment` – Set to `DEV` to start memcached and MySQL locally for development
|
||||
- `serveralias` – Comma-separated list of alternative hostnames
|
||||
- `PHPVER` – PHP version (see above)
|
||||
- `PHPVER` – Informational only. The PHP version is the image tag; in DEV mode a mismatch prints a warning
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user