Installing Docker on Linux
Quick setup instructions for Docker on Linux environments
This page provides quick install instructions for manually setting up Docker on different flavors of Linux. This is normally handled automatically by the Gateway installer script.
Amazon Linux 2
# Engine from amazon-linux-extras
sudo yum update -y
sudo amazon-linux-extras install -y docker
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
newgrp docker
# Install Compose v2 plugin so `docker compose` works
sudo mkdir -p /usr/local/lib/docker/cli-plugins
sudo curl -SL "https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64" \
-o /usr/local/lib/docker/cli-plugins/docker-compose
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
# Verify
docker --version
docker compose version
# Start the service and set to run on reboot
sudo service docker start
sudo chkconfig docker onAmazon Linux 2023
Debian
It is typically recommended to remove any existing Docker or docker-compose that is installed on the Debian machine, and install the official Docker packages (instead of the Debian packages).
The commands to delete the existing Docker version is below:
Don't run this unless you're sure that you want to remove all existing docker installation files, images, containers, etc. This will delete everything.
After removing Docker, it would be a good idea to reboot the device.
Now, install the official Docker packages using the commands below.
Ubuntu
Last updated
Was this helpful?

