Access /var/lib/docker on macOS
23 October 2022 (Updated 23 October 2022)
On this page
Run:
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
Once inside, run:
cd /var/lib/docker && ls -l
Bonus: Add shell alias
# SSH onto Docker VM
# https://stackoverflow.com/questions/38532483/where-is-var-lib-docker-on-mac-os-x
function docker-vm() {
docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
}
Sources
Tagged:
Docker
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment