How to install Docker on Ubuntu 22.04 LTS

In this article, we will see How to install Docker on Ubuntu 22.04 LTS step by step.

Prerequisites to install Docker on Ubuntu:

OS Requirements:

To install Docker Engine, we need the 64-bit version of one of these Ubuntu versions:

Ubuntu Jammy 22.04 (LTS)
Ubuntu Impish 21.10
Ubuntu Focal 20.04 (LTS)
Ubuntu Bionic 18.04 (LTS)

Docker Engine supported architectures: x86_64 (or amd64), armhf, arm64, and s390x.

Step1: Install Dependencies for Docker Installation on Ubuntu

1. Set up the repository:

sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release

How to install Docker on Ubuntu 22.04 LTS

Type ‘Y’ and press enter.

2. Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

3. Set up the stable repository using below command:

echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install Docker Engine on Ubuntu

Update the apt package index, and install the latest version of Docker Engine, containerd, and Docker Compose:

sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Type and enter.

Lets verify docker version installed on Ubuntu:

sudo docker version

Client: Docker Engine - Community Version: 20.10.16 API version: 1.41 Go version: go1.17.10 Git commit: aa7e414 Built: Thu May 12 09:18:18 2022 OS/Arch: linux/amd64 Context: default Experimental: true Server: Docker Engine - Community Engine: Version: 20.10.16 API version: 1.41 (minimum version 1.12) Go version: go1.17.10 Git commit: f756502 Built: Thu May 12 09:16:22 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.4 GitCommit: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16 runc: Version: 1.1.1 GitCommit: v1.1.1-0-g52de29d docker-init: Version: 0.19.0 GitCommit: de40ad0

Leave a Reply

Your email address will not be published. Required fields are marked *