🔧 Complete Docker template update runbook 🔧
Build and Push / build (push) Has been cancelled

Finish syncing generated Docker template files against upstream templates:
remove dead template-files ARGs from the Dockerfile, sync bin-script
boilerplate to the current shell/sh template, migrate the non-standard
rootfs/etc dir to rootfs/tmp/etc, fix a gitignore bug that silently dropped
rootfs/tmp/, correct the README license, and document the go-tools
toolchain-stage exception in the runbook.
- AI.md: document that language toolchain build stages (e.g. `FROM golang:alpine AS go-tools`)
are intentionally exempt from the PULL_URL/GEN_DOCKERFILE_APP_DIR org rule
- Dockerfile: remove dead DEFAULT_FILE_DIR/DEFAULT_DATA_DIR/DEFAULT_CONF_DIR/DEFAULT_TEMPLATE_DIR
ARGs and their mkdir usage — the template-files directory no longer exists
- README.md: fix stale license claim (MIT) to match the actual LICENSE.md (WTFPL)
- .gitignore: anchor the tmp/ pattern to /tmp/ so it stops silently swallowing
the required rootfs/tmp/ directory
- rootfs/etc/profile.d/go.sh -> rootfs/tmp/etc/profile.d/go.sh: migrate the
non-standard rootfs/etc dir to the tmp/etc convention (rootfs/root, rootfs/tmp,
rootfs/usr are the only valid rootfs root dirs; 03-files.sh copies tmp/etc/* at build time)
- rootfs/usr/local/bin/copy, rootfs/usr/local/bin/symlink: sync APPNAME
assignment to the current template style and add the missing trap '' EXIT line
- rootfs/usr/local/bin/healthcheck: sync APPNAME assignment and add the
missing trap '' EXIT line

AI.md
Dockerfile
.gitignore
README.md
rootfs/etc/profile.d/go.sh
rootfs/tmp/
rootfs/usr/local/bin/copy
rootfs/usr/local/bin/healthcheck
rootfs/usr/local/bin/symlink
This commit is contained in:
2026-07-10 19:58:22 -04:00
parent 3266c80323
commit 711972c88b
8 changed files with 23 additions and 42 deletions
+32
View File
@@ -0,0 +1,32 @@
# Go environment - sourced by /etc/profile for interactive login shells.
#
# All Go state lives under /usr/local/share/go (declared as a Docker
# VOLUME). The paths /go, /root/go, /root/.go, /root/.local/share/go and
# /data/go are symlinks to that location, so any of them can be used
# interchangeably and the data persists across container rebuilds when
# the volume is named.
#
# The Go distribution itself lives at /usr/local/go (baked into the image,
# not volumed). Tools installed at build time land in /usr/local/bin.
export GOPATH="${GOPATH:-/usr/local/share/go}"
export GOCACHE="${GOCACHE:-${GOPATH}/cache}"
export CGO_ENABLED="${CGO_ENABLED:-0}"
export GOTOOLCHAIN="${GOTOOLCHAIN:-auto}"
# Go distribution bin first, then baked tools, then GOPATH/bin last so a
# volume-mounted $GOPATH/bin never shadows baked image tools.
case ":${PATH}:" in
*":/usr/local/go/bin:"*) ;;
*) export PATH="/usr/local/go/bin:${PATH}" ;;
esac
case ":${PATH}:" in
*":/usr/local/bin:"*) ;;
*) export PATH="/usr/local/bin:${PATH}" ;;
esac
case ":${PATH}:" in
*":${GOPATH}/bin:"*) ;;
*) export PATH="${PATH}:${GOPATH}/bin" ;;
esac