Is There a Way to Run Docker Inside a nix-shell?

Hmm, so I’m running this on Ubuntu, not NixOS, but AFAICT you just need nix-shell -p rootlesskit docker followed by dockerd-rootless. (My local hack turned out just to be removing --disable-host-loopback which obviously I needed for some specific reason which I’ve now forgotten.)

Only thing I can think you might need to do is make sure /etc/uidmap and friends are set-up, if NixOS doesn’t do it automatically.

4 Likes