pi@raspberry:~ $ sudo apt-get install apt-transport-https ca-certificates software-properties-common -y
pi@raspberry:~ $ sudo nano /boot/cmdline.txt
Append following line
cgroup_enable=memory cgroup_memory=1 cgroup_enable=cpuset swapaccount=1
Ctrl+X
-> Y
-> Enter
pi@raspberry:~ $ sudo reboot
pi@raspberry:~ $ sudo cat /proc/cgroups
pi@raspberry:~ $ cd /tmp && \
curl -fsSL get.docker.com -o get-docker.sh && \
chmod +x get-docker.sh && \
sudo ./get-docker.sh
pi@raspberry:~ $ sudo usermod -aG docker $USER
pi@raspberry:~ $ sudo nano /etc/apt/sources.list.d/docker.list
Append following line
deb https://download.docker.com/linux/debian bullseye stable
Ctrl+X
-> Y
-> Enter
pi@raspberry:~ $ sudo apt-get update
pi@raspberry:~ $ sudo apt-get upgrade
pi@raspberry:~ $ sudo systemctl start docker.service
pi@raspberry:~ $ sudo docker info
pi@raspberry:~ $ sudo apt-get remove --auto-remove docker #Removes docker and dependencies
pi@raspberry:~ $ sudo apt-get purge docker-ce #For newer versions
pi@raspberry:~ $ sudo dpkg -l | grep docker
pi@raspberry:~ $ sudo sudo dpkg --purge docker-ce
pi@raspberry:~ $ sudo sudo dpkg --purge docker-ce-cli
pi@raspberry:~ $ sudo rm -rf /var/lib/docker #Removes all data