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

**URL:** https://discourse.nixos.org/t/is-there-a-way-to-run-docker-inside-a-nix-shell/46824
**Category:** Help
**Created:** [June 10, 2024, 5:32pm UTC](https://discourse.nixos.org/t/is-there-a-way-to-run-docker-inside-a-nix-shell/46824 "2024-06-10T17:32:23Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![srd424](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/s/ba9def/32.png) [@srd424](https://discourse.nixos.org/u/srd424)
#### Post date: [June 11, 2024, 8:33am UTC](https://discourse.nixos.org/t/is-there-a-way-to-run-docker-inside-a-nix-shell/46824/3 "2024-06-11T08:33:22Z")

</div>

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.

---

_[View the full topic](https://discourse.nixos.org/t/is-there-a-way-to-run-docker-inside-a-nix-shell/46824)._
