README: use uid=$(id -u) and the current user in the manual recipe; AlmaLinux 10

The fixed uid=30001 recipe fails on a normal host (host-created logs/ is owned by the host uid, the entrypoint then cannot mkdir under it). Use -e uid=$(id -u) -e user=$(whoami), do not pre-create logs/, pick the PHP version by tag, mention PUBLIC_HTTPS_PORT. The entrypoint has no gid variable (adduser -u derives it), so only uid is documented. AlmaLinux 9 -> 10.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-23 06:03:24 -08:00
1 parent 0eea05815a
commit e540110a46
1 file changed
+15 -3
+15 -3
View File
@@ -1,6 +1,6 @@
# Cloud Apache Container
This is a base container for running PHP-based applications, supporting multiple PHP versions (7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6; 8.6 is cac and cac-fpm only, no LiteSpeed lsphp86 yet). The default is PHP 8.3. The container is based on AlmaLinux 9 and uses Apache with mod_ssl. It is designed for both development and production use.
This is a base container for running PHP-based applications, supporting multiple PHP versions (7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6; 8.6 is cac and cac-fpm only, no LiteSpeed lsphp86 yet). The container is based on AlmaLinux 10 and uses Apache with mod_ssl. It is designed for both development and production use.
**You must have Docker or compatible containerization software running.**
@@ -60,10 +60,22 @@ You can also run the container manually:
mkdir -p local-development/domain.tld
cd local-development/domain.tld
mkdir user
mkdir -p user/logs/{apache,system}
docker run -d -it -p 80:80 -p 443:443 -e PHPVER=84 -e environment=DEV --mount type=bind,source="$(pwd)"/user,target=/home/myuser -v"$name-mysql":/var/lib/mysql -e uid=30001 -e user=myuser -e domain=localhost --name local-dev repo.anhonesthost.net/cloud-hosting-platform/cac:latest
docker volume create local-dev-mysql
docker run -d -it -p 80:80 -p 443:443 \
-e environment=DEV -e PHPVER=84 \
--mount type=bind,source="$(pwd)"/user,target=/home/"$(whoami)" \
-v local-dev-mysql:/var/lib/mysql \
-e uid=$(id -u) -e user=$(whoami) -e domain=localhost \
--name local-dev \
repo.anhonesthost.net/cloud-hosting-platform/cac:php84
```
Notes:
- **`uid` must be your own uid** (`$(id -u)`) and `user` your own username: the entrypoint chowns the mounted directory to that uid, so a fixed value such as 30001 leaves you unable to edit the files on the host. Do not create `logs/` yourself; the container does.
- **The tag (`cac:php84`) selects PHP 8.4.** `PHPVER=84` is informational only (DEV mode warns if it disagrees with the tag).
- Do not bind-mount anything over `/var/log` or `/etc/httpd/logs`; logs are written to `user/logs/apache` and `user/logs/php-fpm`.
- With a non-default HTTPS port (`-p 8443:443`) also pass `-e PUBLIC_HTTPS_PORT=8443` so the HTTP to HTTPS redirect keeps the port.
---
## Accessing the Container