Skip to main content

Docker Installation

Remote server connection from Termius. The commands for the installation depend on the server's OS. Run this command into the Termius terminal to identify the server's OS.

cat /etc/os-release

The server OS is Ubuntu, so the from now on the commands to install Docker are meant for Ubuntu only.

  1. Update the package list
sudo apt update
  1. Install dependencies
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
  1. Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  1. Add Docker's repository

This step is important so the latest official Docker version is installed.

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  1. Update the package list again
sudo apt update
  1. Start Docker
sudo systemctl start docker
  1. Enable Docker
sudo systemctl enable docker
  1. Verify Docker Version
docker --version
  1. Verify Docker Installation
docker run hello-world

If you see "Hello from Docker!" The installation is all done!