- Interactive and ephemeral execution: Runs an interactive container (
-it) and automatically removes it on exit (--rm).
- Host-like connectivity and filesystem context: Uses the host network stack (
--network host) and binds the user’s home directory into both the same path and /root, while setting HOME accordingly (-v ... -e HOME=...).
- Runs from the current directory and forwards inputs: Sets the container working directory to the current directory (
-w "$PWD") and passes through any additional Docker args and image/command parameters ("$@").
docker run -it --rm --network host -v "$HOME":"$HOME" -v "$HOME":/root -e HOME="$HOME" -w "$PWD" "$@"