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.
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
You dont need to use a privileged container, see