🐛 Fix four remaining AI.md inaccuracies from final audit 🐛

- AI.md: --mariadb not in LONGOPTS so getopt rejects it silently;
document --mysql as the working flag with a note about --mariadb
- AI.md: Stage 1 bootstrap RUN missing ca-certificates install and
update-ca-certificates call (from alpinelinux.template lines 66-69)
- AI.md: hook function count said "eight" but eleven are listed; fixed to eleven
- AI.md: label URL values were hardcoded to casjaysdevdocker/docker.io;
corrected to ${GEN_DOCKERFILE_HUB_REPO} and ${GEN_DOCKERFILE_GIT_REPO}
which are computed from ENV_REGISTRY_URL/ENV_REGISTRY_PUSH/git remote

AI.md
This commit is contained in:
2026-06-26 13:09:21 -04:00
parent 4fda116227
commit 9bd1f3995c
+8 -8
View File
@@ -178,7 +178,7 @@ gen-dockerfile --dir ./myapp actions
| `--pkmgr` | Generate `pkmgr` script only and exit | | `--pkmgr` | Generate `pkmgr` script only and exit |
| `--apache` | Add Apache2 packages + setup | | `--apache` | Add Apache2 packages + setup |
| `--nginx` | Add nginx packages + setup | | `--nginx` | Add nginx packages + setup |
| `--mysql` / `--mariadb` | Add MariaDB packages + setup | | `--mysql` | Add MariaDB packages + setup (`--mariadb` is handled in the case block but not registered in getopt — use `--mysql`) |
| `--postgres` | Add PostgreSQL packages + setup | | `--postgres` | Add PostgreSQL packages + setup |
| `--php` | Add PHP packages + setup | | `--php` | Add PHP packages + setup |
| `--application <name>` | Add a templatemgr application install step | | `--application <name>` | Add a templatemgr application install step |
@@ -378,7 +378,7 @@ ENV TERM="xterm-256color"
ENV HOSTNAME="casjaysdevdocker-${IMAGE_NAME}" ENV HOSTNAME="casjaysdevdocker-${IMAGE_NAME}"
COPY ./rootfs/. / COPY ./rootfs/. /
RUN pkmgr update; pkmgr install bash RUN pkmgr update; pkmgr install bash ca-certificates; update-ca-certificates
ENV SHELL="/bin/bash" ENV SHELL="/bin/bash"
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
@@ -446,16 +446,16 @@ LABEL org.opencontainers.image.authors="${LICENSE}"
LABEL org.opencontainers.image.created="${BUILD_DATE}" LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.version="${BUILD_VERSION}" LABEL org.opencontainers.image.version="${BUILD_VERSION}"
LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}" LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/casjaysdevdocker/${IMAGE_NAME}" LABEL org.opencontainers.image.url="${GEN_DOCKERFILE_HUB_REPO}"
LABEL org.opencontainers.image.source="https://hub.docker.com/r/casjaysdevdocker/${IMAGE_NAME}" LABEL org.opencontainers.image.source="${GEN_DOCKERFILE_HUB_REPO}"
LABEL org.opencontainers.image.vcs-type="Git" LABEL org.opencontainers.image.vcs-type="Git"
LABEL org.opencontainers.image.revision="${GIT_COMMIT}" LABEL org.opencontainers.image.revision="${GIT_COMMIT}"
LABEL org.opencontainers.image.source="https://github.com/casjaysdevdocker/${IMAGE_NAME}" LABEL org.opencontainers.image.source="${GEN_DOCKERFILE_GIT_REPO}"
LABEL org.opencontainers.image.documentation="https://github.com/casjaysdevdocker/${IMAGE_NAME}" LABEL org.opencontainers.image.documentation="${GEN_DOCKERFILE_GIT_REPO}"
LABEL com.github.containers.toolbox="false" LABEL com.github.containers.toolbox="false"
``` ```
> **Note:** `org.opencontainers.image.source` appears twice intentionally — first set to the Docker Hub URL, then overridden to the Git source URL. The second value wins at runtime. > **Note:** `org.opencontainers.image.source` appears twice intentionally — first set to `GEN_DOCKERFILE_HUB_REPO` (computed from `ENV_REGISTRY_URL`/`ENV_REGISTRY_PUSH`), then overridden to `GEN_DOCKERFILE_GIT_REPO` (the Git remote URL). The second value wins at runtime. Neither URL is hardcoded — they reflect whatever registry and org the project is configured for.
--- ---
@@ -563,7 +563,7 @@ RUNAS_USER="root"
### Required Hook Functions in Every Init.d Script ### Required Hook Functions in Every Init.d Script
All eight must be defined (even if they just `return 0`): All eleven must be defined (even if they just `return 0`):
```bash ```bash
__run_precopy() # runs before copying /config to /etc __run_precopy() # runs before copying /config to /etc