Skip to content

Instantly share code, notes, and snippets.

@hubgit
Created June 20, 2025 22:21
Show Gist options
  • Save hubgit/2b82a3895231926a8e8b2c2898410ced to your computer and use it in GitHub Desktop.
Save hubgit/2b82a3895231926a8e8b2c2898410ced to your computer and use it in GitHub Desktop.
Open the current directory in a Docker container
# Open the current directory in a Docker container
function container() {
IMAGE=${1:-ubuntu:questing}
echo "Opening $PWD in $IMAGE"
docker run --rm -it -v "$PWD":/workspace -w /workspace "$IMAGE" bash
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment