Docker & Container Support
- Auto-detect Docker/container environments via
/.dockerenv,/proc/1/cgroup, and/proc/self/mountinfo - Write
~/.lean-ctx/env.shduringlean-ctx init --global— a standalone shell hook file without the non-interactive guard ([ -z "$PS1" ] && return) that most~/.bashrcfiles have - Docker BASH_ENV warning: when Docker is detected and
BASH_ENVis not set,lean-ctx initnow prints the exact Dockerfile line needed:ENV BASH_ENV="/root/.lean-ctx/env.sh" lean-ctx setupauto-fallback: detects non-interactive terminals (no TTY on stdin) and automatically runs shell hook install only instead of hanginglean-ctx doctorDocker check: new diagnostic that warns when running in a container with bash but withoutBASH_ENVset
Critical Fix
BASH_ENV="/root/.bashrc"never worked in Docker — Ubuntu/Debian.bashrchas[ -z "$PS1" ] && returnwhich skips the entire file in non-interactive shells. The newenv.shapproach bypasses this completely.
Upgrade
cargo install lean-ctx # or
npm update -g lean-ctx-bin # or
brew upgrade lean-ctxFull Changelog: v3.1.3...v3.1.3