https://homenetworkguy.com/how-to/install-pihole-on-raspberry-pi-with-docker-and-portainer/
To get started with Docker Engine on Ubuntu, make sure you have one of following OS
- Ubuntu Focal 20.04 (LTS)
- Ubuntu Bionic 18.04 (LTS)
- Ubuntu Xenial 16.04 (LTS)
Uninstall older version of docker
sudo apt-get remove docker docker-engine docker.io containerd runc
It’s OK if apt-get reports that none of these packages are installed.
- Update the apt package index and install packages to allow apt to use a repository over HTTPS:
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
-
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-
Setup the stable repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
Verity that Docker Engine is installed correctly
sudo docker run hello-world
or
sudo systemctl status docker
sudo apt-get purge docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker
“Failuredriver failed programming external connectivity on endpoint Pihole (c9b821f72080bbc4cf5a736b170e50cfcccbf7c3e312384356edcec8e740d63b): Error starting userland proxy: listen tcp 0.0.0.0:53: bind: address already in use” it means that the port 53 is already in use
To remove this error type this command in the ubuntu terminal:
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved.service