📝 Fix web/xorg pull sources, --startup desc, .github path refs 📝

- AI.md: correct `web` and `xorg` pull sources to `casjaysdev/web` and
`casjaysdev/xorg` (pre-built images, not raw Debian)
- AI.md: update note clarifying upstream vs casjaysdev pull source logic
- AI.md: expand `--startup` description — names the target path, the
gen-script backend, and shows the required positional filename arg
- AI.md: replace all bare `.github/example/` path references with the
explicit `casjaysdevdocker/.github/example/` org-level repo path so
the file remains meaningful when copied into any container project
- AI.md: replace "copy from .github/example" workflow steps with
`gen-dockerfile --startup` commands
- AI.md: all .github/example path refs → casjaysdevdocker/.github/example/
- AI.md: web/xorg pull source column corrected to casjaysdev pre-built images
- AI.md: --startup flag description expanded with path and gen-script detail

AI.md
This commit is contained in:
2026-06-26 12:57:51 -04:00
parent 2a80da6a38
commit 6733216b35
+12 -11
View File
@@ -148,11 +148,11 @@ gen-dockerfile --dir ./myapp actions
| `debian` | Debian | `debian` |
| `ubuntu` | Ubuntu | `ubuntu` |
| `rhel` / `almalinux` / `rockylinux` / `centos` / `oraclelinux` / `redhat` | AlmaLinux/RHEL family | `almalinux` |
| `web` | Debian-based build stage + xorg + web packages; final image is scratch | Debian |
| `xorg` | Debian-based build stage + xorg packages; final image is scratch | Debian |
| `web` | `casjaysdev/web` build stage (pre-built xorg + web packages) + scratch final image; default ports `5800`/`5900` | `casjaysdev/web` |
| `xorg` | `casjaysdev/xorg` build stage (pre-built xorg packages) + scratch final image | `casjaysdev/xorg` |
| `scratch` | Scratch final image only (pair with any build template) | N/A |
> **Note:** The pull source is the base image pulled for the **build stage**. All templates produce a `FROM scratch` final stage. The casjaysdev registry images (`casjaysdev/alpine`, `casjaysdev/debian`, etc.) are the **push/output** targets, not the pull source.
> **Note:** The pull source is the base image pulled for the **build stage**. All templates produce a `FROM scratch` final stage. For standard distros (`alpine`, `debian`, `ubuntu`, `rhel`, `arch`), the pull source is the official upstream image. For `web` and `xorg`, the pull source is a pre-built casjaysdev image that already includes xorg; specify `--distro-name` to override.
### CLI Flags
@@ -168,7 +168,7 @@ gen-dockerfile --dir ./myapp actions
| `--add-tags <tags>` | Comma-separated additional tags (or `USE_DATE` for auto date tag) |
| `--distro-name <image>` | Base image pull URL (overrides `ENV_PULL_URL`) |
| `--distro-version <tag>` | Base image tag (overrides `ENV_DISTRO_TAG`) |
| `--startup` | Create a container start script only |
| `--startup` | Generate an init.d service script at `rootfs/usr/local/etc/docker/init.d/<name>` via `gen-script other start-service`; takes the script filename as a positional argument (e.g. `gen-dockerfile --startup 01-myapp.sh`) |
| `--nogit` | Skip `git init` in the new project dir |
| `--dockerfile` | Regenerate Dockerfile only — skip other files |
| `--update` | Re-run gen-dockerfile on an existing project to regenerate files |
@@ -194,7 +194,7 @@ gen-dockerfile --dir ./myapp actions
gen-dockerfile --dir ./myapp actions
```
Creates `.gitea/workflows/build.yml` (or `build.$version.yml` for versioned tags) from the existing `Dockerfile`. The example workflow in `.github/example/.gitea/workflows/docker.yaml` is the canonical reference pattern for the legacy hand-written style; `gen-dockerfile actions` generates `build.yml` with the same structure.
Creates `.gitea/workflows/build.yml` (or `build.$version.yml` for versioned tags) from the existing `Dockerfile`. The canonical reference for the legacy hand-written style is `.gitea/workflows/docker.yaml` in the `casjaysdevdocker/.github` org-level repository (`casjaysdevdocker/.github/example/`); `gen-dockerfile actions` generates the modern `build.yml` — use that for all new containers.
### Template Resolution
@@ -544,7 +544,7 @@ Build-time scripts in `rootfs/root/docker/setup/` run inside the Docker build la
init.d/03-php-fpm.sh — PHP-FPM for web UI
```
- **Migration task = UPDATE each script to the canonical pattern, never delete services.**
- The canonical pattern is `.github/example/rootfs/usr/local/etc/docker/init.d/04-example.sh`.
- The canonical pattern is `04-example.sh` in the `casjaysdevdocker/.github` org-level repository, or generate a fresh one with `gen-dockerfile --startup <name>`.
### Required Variables in Every Init.d Script
@@ -620,7 +620,7 @@ USER_FILE_PREFIX="/config/secure/auth/user"
| File | Origin | Never overwrite? |
|------|--------|-----------------|
| `.gitea/workflows/docker.yaml` | Hand-crafted legacy file kept in `.github/example/` | Yes — do not overwrite |
| `.gitea/workflows/docker.yaml` | Hand-crafted legacy file; reference copy in `casjaysdevdocker/.github/example/` | Yes — do not overwrite |
| `.gitea/workflows/build.yml` | Generated by `gen-dockerfile actions` | No — regenerate freely |
### Generated Workflow (`gen-dockerfile actions`)
@@ -724,7 +724,7 @@ For versioned builds (`gen-dockerfile actions` on a tagged version), the workflo
### Hand-Crafted Workflow (`.gitea/workflows/docker.yaml`)
The legacy `docker.yaml` in `.github/example/` is hand-crafted and kept for reference. It differs from the generated workflow: uses `catthehacker/ubuntu:act-latest` container, tag-pinned actions (`@v2`/`@v3`/`@v4`), `secrets.DOCKER_USERNAME` + `secrets.DOCKER_TOKEN`, and the old `steps.meta.outputs.*` pattern. Do not use this as a template for new containers — use `gen-dockerfile actions` instead.
The legacy `docker.yaml` is hand-crafted; the reference copy lives in `casjaysdevdocker/.github/example/` (the org-level repository). It differs from the generated workflow: uses `catthehacker/ubuntu:act-latest` container, tag-pinned actions (`@v2`/`@v3`/`@v4`), `secrets.DOCKER_USERNAME` + `secrets.DOCKER_TOKEN`, and the old `steps.meta.outputs.*` pattern. Do not use this as a template for new containers — use `gen-dockerfile actions` instead.
---
@@ -755,7 +755,8 @@ gen-dockerfile --dir ./myapp alpine
# 3. Customise setup scripts in rootfs/root/docker/setup/
# 4. Add init.d runtime script (copy from .github/example)
# 4. Generate an init.d runtime script
gen-dockerfile --startup 01-myapp.sh
# 5. Build and test
docker build -t myapp .
@@ -778,7 +779,7 @@ gen-dockerfile --dir ./myapp actions
1. `gen-dockerfile --dir /path/to/new-container --nogit alpine`
2. Edit `.env.scripts` — set `ENV_REGISTRY_REPO`, `ENV_REGISTRY_PUSH`, `ENV_GIT_REPO_URL`
3. Copy `04-example.sh` from `.github/example/` as the starting point for init.d scripts
3. Generate the init.d service script: `gen-dockerfile --startup 01-myapp.sh`
4. Add application-specific setup in `rootfs/root/docker/setup/05-custom.sh`
---
@@ -823,4 +824,4 @@ gen-dockerfile --dir ./myapp actions
- **Git Repository:** <https://github.com/casjaysdevdocker>
- **gen-dockerfile Tool:** `/usr/local/bin/gen-dockerfile` (source: `casjay-dotfiles/scripts/bin/gen-dockerfile`)
- **Template Source:** `casjay-dotfiles/scripts/templates/dockerfiles/`
- **Example Project:** `.github/example/`
- **Example Project:** `casjaysdevdocker/.github/example/` (org-level repository — not present in individual container repos)