How to Run Docker in Alpine Container in LXC/LXD

How to Run Docker in Alpine Container in LXC/LXD

When experimenting with Docker Swarm, I decided to set up five more nodes on my local computer. I used Alpine images in the LXC, and tried to use Docker in them. Although docker stared successfully, it was impossible to deploy any services to Alpine nodes, deployment failed with “cgroups: cannot find cgroup mount destination: unknown” error message.

Because I dislike when something that should work, does not work the way I expect it to work, I decided to dig deeper and try to fix the problem.