Site logo
Self Hosting

Install Docker Engine on Ubuntu

Why install docker - There are many reasons for installing docker...

23 August 2026By Aayush S.

Why install docker - There are many reasons for installing docker as you can keep your all the files in a container and if the application has error then it does not effect your system as its isolated. Docker containers are also portable as you can just archive it and share to different device and it works perfectly fine, you don't have to match the device settings.
The major use of docker is if it works in your device and it will work in all the devices.

Now lets go on the installation part, i will be adding installation in Ubuntu (since this post will be for servers, i am installing for Ubuntu Server - you can do same in other Linux distros)

  1. Set up Docker's apt repository.
bash
# Add Docker's official GPG key:
sudo apt update
sudo apt 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

# Add the repository to Apt sources:
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 update

2. Install the Docker packages.

bash
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

3. Verify that the installation is successful by running the hello-world image:

bash
sudo docker run hello-world

You have now successfully installed docker in your Ubuntu Server.

This is just basic installation, if you wanna learn more in depth then here is the

official link: https://docs.docker.com/engine/install/ubuntu/


Now, further post will be on docker container installations.