Skip to content

Instantly share code, notes, and snippets.

@merura
Created August 28, 2025 07:40
Show Gist options
  • Select an option

  • Save merura/3d86331ac2278d99610b992c2c561686 to your computer and use it in GitHub Desktop.

Select an option

Save merura/3d86331ac2278d99610b992c2c561686 to your computer and use it in GitHub Desktop.
direnv rootful docker
# rootful docker
export PATH="$PWD/.direnv/bin:$PATH"
if [ ! -x .direnv/bin/docker ]; then
mkdir -p .direnv/bin
cat > .direnv/bin/docker <<'EOF'
#!/usr/bin/env bash
exec sudo /run/current-system/sw/bin/docker "$@"
EOF
chmod +x .direnv/bin/docker
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment