mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
Adds INFINITO_VENV_DIR=/opt/venvs/infinito to default.env (registered
in passthrough's STATIC_KEYS so make dotenv propagates it to .env) and
threads it through the build chain: compose.yml forwards it as a build
arg; scripts/image/push.sh asserts and --build-args it; the Dockerfile
declares the matching ARG/ENV and derives PYTHON/PIP/PATH from the
variable. scripts/meta/env/python.sh now prefers the value when set
before its fallback discovery so the SPOT is effective in env
resolution.
Fixes the dev image build regression where 'infinito --version' in
scripts/docker/entry.sh exited 127. Root cause: the Dockerfile RUN
SHELL uses bash -lc, which sources /etc/profile and resets PATH to
the Debian default, dropping ${INFINITO_VENV_DIR}/bin from it. The
fix invokes the script via its absolute path "${INFINITO_VENV_DIR}/bin/infinito"
so the post-install version check no longer depends on a PATH that
the login-shell init has just clobbered.
scripts/lint/wrapper.sh's existing PATH-reset note now references the
variable instead of the literal path. test-install-make.yml and
test-install-pkgmgr.yml read INFINITO_VENV_DIR from default.env up
front, pass it into their pkgmgr containers, and source the venv
activate script via the variable.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
50 lines
1.0 KiB
Bash
Executable File
50 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
echo "[docker-infinito] Starting infinito container"
|
|
|
|
if [[ "${1:-}" == "/sbin/init" ]]; then
|
|
echo "[docker-infinito] Starting systemd as PID 1..."
|
|
exec /sbin/init
|
|
fi
|
|
|
|
: "${INFINITO_SRC_DIR:?INFINITO_SRC_DIR must be set by the container environment}"
|
|
: "${INFINITO_VENV_DIR:?INFINITO_VENV_DIR must be set by the container environment}"
|
|
export INFINITO_SRC_DIR INFINITO_VENV_DIR
|
|
|
|
run_local_build() {
|
|
echo "[docker-infinito] Build enabled (--compile)"
|
|
cd "${INFINITO_SRC_DIR}"
|
|
echo "[docker-infinito] Reinstall via 'make install' in ${INFINITO_SRC_DIR}..."
|
|
make install
|
|
echo "[docker-infinito] Installed:"
|
|
"${INFINITO_VENV_DIR}/bin/infinito" --version
|
|
}
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
case "$1" in
|
|
--compile)
|
|
shift
|
|
run_local_build
|
|
;;
|
|
--compile-silent)
|
|
shift
|
|
run_local_build >/dev/null 2>&1
|
|
;;
|
|
--)
|
|
shift
|
|
break
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
echo "[docker-infinito] No arguments provided. Showing infinito help..."
|
|
exec infinito --help
|
|
else
|
|
cd "${INFINITO_SRC_DIR}"
|
|
exec "$@"
|
|
fi
|