Running lazydocker via docker
To run lazydocker without running the binary directly on your system, you can create a wrapper script that runs it via Docker. The following commands will create a script named lzd
in /usr/local/bin
that executes lazydocker in a Docker container.
# Create the script
sudo tee /usr/local/bin/lzd > /dev/null << 'EOF'
#!/bin/bash
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock lazyteam/lazydocker "$@"
EOF
# Make it executable
sudo chmod +x /usr/local/bin/lzd