Skip to content

Installing Docker

Below are the commands for various systems to install Docker:

  • APK Systems (Alpine)
sudo apk add docker
sudo rc-update add docker boot
sudo service docker start

Use Docker's convenience script (this also installs Docker Compose):

sudo apt-get install curl
bash -c "$(curl -fsSL https://get.docker.com)"

or install manually (this doesn't install Docker Compose):

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Raspbian requires a few extra commands, and isn't reliably covered by the manual apt repository method above -- use Docker's convenience script instead

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install curl
bash -c "$(curl -fsSL https://get.docker.com)"

OpenMediaVault (OMV) requires special instructions found here

Use Docker's convenience script (this also installs Docker Compose):

sudo apt-get install curl
bash -c "$(curl -fsSL https://get.docker.com)"

or install manually (this doesn't install Docker Compose):

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

Use Docker's convenience script (this also installs Docker Compose):

sudo dnf install curl
bash -c "$(curl -fsSL https://get.docker.com)"

or install manually (this doesn't install Docker Compose):

sudo dnf config-manager addrepo --from-repofile https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl enable --now docker
  • Pacman Systems (Arch, Manjaro, EndeavourOS, etc.)
sudo pacman -Sy docker
sudo systemctl enable --now docker

Use Docker's convenience script (this also installs Docker Compose):

sudo yum install curl
bash -c "$(curl -fsSL https://get.docker.com)"

or install manually (this doesn't install Docker Compose):

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl enable --now docker
brew update
brew upgrade --cask
brew upgrade
brew install --cask docker

or

brew update
brew upgrade --cask
brew upgrade
brew install docker

Additional Steps for MacOS: - Run Docker at start up: - In docker desktop (Docker.app) open settings and ensure "Start Docker Desktop when you sign in to your computer" is enabled in the General heading. This step is required to to start docker automatically after a restart and allow DockSTARTer to communicate with the docker daemon. - Approve Docker keychain permissions: - At least once after installing DockSTARTer2 open the terminal.app from the MacOS desktop and run the DockSTARTer2 command ds2. A keychain access dialog will pop up. Type your MacOS login password into the dialog and click on "Always Allow".