🔧 Refactor env vars and optimize Go tool installation 🔧

- Rename ENV_IMAGE_NAME to ENV_REGISTRY_REPO and ENV_ORG_NAME to ENV_REGISTRY_ORG for consistent naming
- Clarify ENV_REGISTRY_URL to be the provider base URL and rename ENV_IMAGE_PUSH to ENV_REGISTRY_PUSH
- Extract install_go_tool helper to handle best-effort installs with periodic cache flushing every 5 tools
- Add GOMAXPROCS, GOMEMLIMIT, and GOFLAGS env vars for controlled Go build resource usage
- Clear test cache before module cache cleanup to reduce peak disk usage during image builds

.env.scripts
rootfs/root/docker/setup/05-custom.sh
This commit is contained in:
2026-05-04 20:58:11 -04:00
parent 4af40e9195
commit 32061b8169
2 changed files with 35 additions and 16 deletions
+11 -9
View File
@@ -1,10 +1,10 @@
# - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202604221922-git
##@Version : 202605041627-git
# @@Author : CasjaysDev
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
# @@License : MIT
# @@Copyright : Copyright 2026 CasjaysDev
# @@Created : Wed Apr 22 07:22:44 PM EDT 2026
# @@Created : Mon May 4 04:27:58 PM EDT 2026
# @@File : .env.scripts
# @@Description : Variables for gen-dockerfile and buildx scripts
# @@Changelog : newScript
@@ -25,11 +25,12 @@ DOCKER_ENTYPOINT_HEALTH_ENDPOINTS="$DOCKER_ENTYPOINT_HEALTH_ENDPOINTS"
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Dockerfile info
ENV_DOCKERFILE="Dockerfile"
ENV_IMAGE_NAME="go"
# ENV_REGISTRY_REPO: Registry repository/image name
ENV_REGISTRY_REPO="go"
ENV_USE_TEMPLATE="alpine"
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Maintainer info
ENV_ORG_NAME="casjaysdev"
ENV_REGISTRY_ORG="casjaysdev"
ENV_VENDOR="CasjaysDev"
ENV_AUTHOR="CasjaysDev"
ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
@@ -37,12 +38,12 @@ ENV_MAINTAINER="CasjaysDev <docker-admin@casjaysdev.pro>"
# Repository URLs (Full URLs)
# ENV_GIT_REPO_URL: Complete Git repository URL for source code
ENV_GIT_REPO_URL="https://github.com/dockersrc/go"
# ENV_REGISTRY_URL: Complete registry URL for reference (NOT used for pushing)
ENV_REGISTRY_URL="https://hub.docker.com/casjaysdev/go"
# ENV_REGISTRY_URL: Registry provider base URL (for example https://docker.io)
ENV_REGISTRY_URL="https://docker.io"
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Push Configuration
# ENV_IMAGE_PUSH: Complete push destination (this IS used for pushing)
ENV_IMAGE_PUSH="casjaysdev/go"
# ENV_REGISTRY_PUSH: Complete push destination derived from registry/org/repo
ENV_REGISTRY_PUSH="casjaysdev/go"
# ENV_IMAGE_TAG: Default tag for the image
ENV_IMAGE_TAG="latest"
# ENV_ADD_TAGS: Additional tags, comma-separated (USE_DATE = auto date tag)
@@ -62,7 +63,7 @@ SERVICE_PORT=""
EXPOSE_PORTS=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# IF using a lanuage such as go, php, rust, ruby, etc set the version here.
LANG_VERSION="go"
LANG_VERSION=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Versions
PHP_VERSION="system"
@@ -80,3 +81,4 @@ ENV_PACKAGES=""
# - - - - - - - - - - - - - - - - - - - - - - - - -
# ex: ts=2 sw=2 et filetype=sh
# - - - - - - - - - - - - - - - - - - - - - - - - -