Advanced TutorialsComputingdockerEmerging Tech (AI, IoT, etc.)News

How to install Docker on Ubuntu 22.04 LTS

Step 1: Update package index

sudo apt update

Step 2: Install dependencies

sudo apt install apt-transport-https ca-certificates curl software-properties-common -y

Step 3: Add Docker’s GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

Step 4: Add Docker repository

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

Step 5: Install Docker Engine

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

Step 6: Verify installation

sudo docker run hello-world

This will download a test image and run it in a container to verify Docker is installed correctly.[1][4]

Step 7: Add user to docker group (optional)

sudo usermod -aG docker $USER
newgrp docker

This allows running Docker commands without sudo.[1][2]

Citations:
[1] https://cloudcone.com/docs/article/how-to-install-docker-on-ubuntu-22-04-20-04/
[2] https://www.cherryservers.com/blog/install-docker-ubuntu-22-04
[3] https://www.reddit.com/r/docker/comments/tksg0b/2204_best_way_to_install_docker/
[4] https://www.youtube.com/watch?v=JfM8w70AXVQ
[5] https://docs.docker.com/engine/install/ubuntu/

Bill

Bill is a passionate network engineer who loves to share his knowledge and experience with others. He writes engaging blog posts for itacute.com, where he covers topics such as home and small business networking, electronic gadgets, and tips and tricks to optimize performance and productivity. Bill enjoys learning new things and keeping up with the latest trends and innovations in the field of technology.

Leave a Reply

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