From a236c9004374a67299045dc1b86fb147134dd18a Mon Sep 17 00:00:00 2001 From: casjay Date: Thu, 4 Jun 2026 12:42:12 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Speed=20up=20go=20toolchain=20conta?= =?UTF-8?q?iner=20startup=20=E2=9A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pre-set service-discovery vars in a Docker env file so the entrypoint's ${VAR:-$(function)} expansions skip all seven __find_* subprocess forks on every container start. Also suppress the startup banner and health loop since this image has no long-running daemon. Fix overly-broad `env/` gitignore pattern that silently swallowed rootfs/…/docker/env/ and any other env directory in the tree. Replace with the root-anchored `/env/` and `src/env/` which only match the Python venv paths originally intended. - rootfs/usr/local/etc/docker/env/go.sh: new — pre-sets PHP_INI_DIR, PHP_BIN_DIR, HTTPD_CONFIG_FILE, NGINX_CONFIG_FILE, MYSQL_CONFIG_FILE, PGSQL_CONFIG_FILE, MONGODB_CONFIG_FILE to "none"; sets ENTRYPOINT_MESSAGE=no and HEALTH_ENABLED=no - .gitignore: replace bare `env/` with `/env/` and `src/env/` to avoid matching Docker env config directories inside rootfs .gitignore rootfs/usr/local/etc/docker/env/ --- .gitignore | 4 +++- rootfs/usr/local/etc/docker/env/go.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 rootfs/usr/local/etc/docker/env/go.sh diff --git a/.gitignore b/.gitignore index bfffc06..8e7fe5f 100644 --- a/.gitignore +++ b/.gitignore @@ -189,7 +189,9 @@ __pycache__/ .eggs/ .venv/ venv/ -env/ +# bare 'env/' would swallow rootfs/…/docker/env/ — use anchored patterns instead +/env/ +src/env/ ### Logs ### *.log diff --git a/rootfs/usr/local/etc/docker/env/go.sh b/rootfs/usr/local/etc/docker/env/go.sh new file mode 100644 index 0000000..fc15bcf --- /dev/null +++ b/rootfs/usr/local/etc/docker/env/go.sh @@ -0,0 +1,14 @@ +# Go toolchain image — pre-set service-discovery vars to skip __find_* subprocess forks +# The entrypoint sources this before the ${VAR:-$(function)} expansions, so each +# non-empty assignment here silently short-circuits the matching find call. +PHP_INI_DIR="none" +PHP_BIN_DIR="none" +HTTPD_CONFIG_FILE="none" +NGINX_CONFIG_FILE="none" +MYSQL_CONFIG_FILE="none" +PGSQL_CONFIG_FILE="none" +MONGODB_CONFIG_FILE="none" + +# This image has no long-running daemon; suppress the startup banner and health loop +ENTRYPOINT_MESSAGE="no" +HEALTH_ENABLED="no"