Skip to content

Latest commit

 

History

History
55 lines (45 loc) · 1.7 KB

docker-install.md

File metadata and controls

55 lines (45 loc) · 1.7 KB

Installing Docker

Note: I am expecting you to be using Linux. If you are using Windows or Mac, install Docker Desktop
Note: This is also expecting you to be using Ubuntu/Debian or anything bases on them with the APT package manager. If you are using something different please visit the Docker Documentation for more information.
  1. Remove all conflicting packages
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
  1. Update the APT package index
sudo apt update
  1. Install packages to allow apt to use a repository over HTTPS
sudo apt install ca-certificates curl gnupg
  1. Add Docker's official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
  1. Add the Docker APT repository
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 
  1. Update the APT package index
sudo apt update
  1. Install the latest version of Docker Engine and containerd
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  1. Add your user to the docker group
sudo usermod -aG docker $USER
  1. Reboot your computer
sudo reboot
  1. You are now done installing Docker!