Docker Wrapper Command for Interactive, Host-Networked Runs with Local Home and Working Directory Mounts
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 -eHOME="$HOME"-w"$PWD""$@"
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (0)