Documentation copied from here: https://docs.armbian.com/User-Guide_Advanced-Features/#how-to-run-docker, added here in case that goes down. The following should work for any debian based OS, but currently I'm working with Armbian
First switch to root using `sudo su - root`, then create a file called `/root/install-docker.sh` and put the content of this file in it:
apt-get remove docker docker-engine docker.io containerd runc apt-get install ca-certificates curl gnupg lsb-release mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
After that make the file executable for convenience using `chmod a+x /root/install-docker.sh`.
Install and Prepare Docker
When the file is ready, run: `/home/install-docker.sh` and wait until docker is done installing.
Give your user permission to run docker without escalating permissions (aka not root and not sudo), to do so simply run: `usermod -aG docker your-username`. Log out and log back in
Test Docker with your user
Now that you're reconnected to your device, test docker permissions by running `docker run hello-world`