-
-
Save pablodz/daa8ff298663cc4f88cf2cfc966bbede to your computer and use it in GitHub Desktop.
# [🟨OPTIONAL] Uninstall old docker versions | |
sudo apt-get remove docker docker-engine docker.io containerd runc | |
# Refresh latest version | |
sudo apt-get update | |
# Install pre-req | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release | |
# Add docker official GPG key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
# x86 and amd_64 HERE WE CHANGE | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
# Install docker | |
sudo apt-get update | |
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | |
# Give docker permissions | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
# Check version | |
docker --version | |
# Check if installed | |
sudo docker run hello-world | |
# If still fails, reboot OS | |
# Downloand docker compose stable | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
# Apply executable to binary | |
sudo chmod +x /usr/local/bin/docker-compose | |
# Check version | |
docker-compose --version |
Thank you, sir! By the way, what is exactly wrong with the official instructions?
I was getting Unable to locate package docker-ce-cli
.
Thank you, sir! By the way, what is exactly wrong with the official instructions?
Docker doesn't have release for impish ubuntu yet. So, we force hirsute
version inline 17
I was getting
Unable to locate package docker-ce-cli
.
Maybe this will helpful https://unix.stackexchange.com/a/363058
Thanks you!
Also if you are running on a Raspberry Pi 4 I found I also had to install the linux-modules-extra-raspi
package to get it working.
It work, thank you @pablodz !
Thx a lot for explanations and details.
Thx @JinxedDev I did your fixe and now all is fine.
Now, Docker supports ubuntu 21.10
I changed the script to
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
very helpful thank you very much :)
thank you!
Right on! Worked just fine! Thank you very much!!
Thank you for this quick writeup!
Such a lifesaver! Thanks @pablodz 🏆
Thank you guys, that's fuel to keep doing things to solve problems