Installing Docker on Ubuntu/Debian #
-
Update the apt package index:
sudo apt-get update -
Install packages to allow apt to use a repository over HTTPS:
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 - -
Set up the stable Docker repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -
Update the apt package index:
sudo apt-get update -
Install Docker:
sudo apt-get install docker-ce docker-ce-cli containerd.io
Installing Docker on Centos #
-
Uninstall old versions:
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine -
Install required packages:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 -
Set up the stable Docker repository:
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo -
Install Docker:
sudo yum install docker-ce docker-ce-cli containerd.io -
Start Docker:
sudo systemctl start docker
Installing Docker on Windows #
-
Download the Docker Desktop installer:
https://hub.docker.com/editions/community/docker-ce-desktop-windows/ -
Double-click Docker Desktop Installer.exe to run the installer.
-
Follow the installer prompts to accept the default configuration.
-
Docker Desktop starts automatically after installation.
Installing Docker on MacOS #
-
Download the Docker Desktop installer:
https://hub.docker.com/editions/community/docker-ce-desktop-mac/ -
Double-click Docker.dmg to open the installer, then drag Moby the whale to the Applications folder.
-
Double-click Docker.app in the Applications folder to start Docker Desktop.
-
Docker Desktop starts automatically after installation.