Rootfull docker inside unprivileged LXD container


Is it possible to run docker inside unprivileged LXD container?

The motivations comes from the fact the projects like Nextcloud are providing docker images. These images can be easily kept upto date automatically using tools like watchtower. The upstream provided images are possibly more reliable than the distro provided builds. My LXD containers need manual intervention to update unlike docker/watchtower.


Take a look at Running Docker inside of a LXD container - YouTube it may help you


You can use Docker in a unprivileged container

But, you have to use Nested containers

lxc launch ubuntu:22.04 nextcloud -c security.nesting=true

Or to change an existing container:
lxc config set nextcloud security.nesting true


PS: You can also use Docker in a privileged container :slight_smile:

You dont need to use a privileged container, see

1 Like