Always use the official documentation
Use other sources only when the official instructions doesn’t work, for example when you want to install Docker on a system which is not supported.
The issue also could be caused by the fact that you want to run Docker inside an LXC container. I would at least use a virtual machine created by LXD, but LXC containers could work too. My point is that the best way to find the reason is trying to install the official way first, figuring out if that works and make changes only when you know which step worked and which isn’t.