Skip to main content

Command Palette

Search for a command to run...

Install docker and docker compose in ubuntu 22.04

Updated
1 min read
Install docker and docker compose in ubuntu 22.04
R

Full-stack developer with mastery across mobile (React Native, Ionic), front-end (React, Svelte, Vue.js), back-end (Express.js, FastAPI, Django), e-commerce (Shopify, OpenCart), and CMS (Wordpress, Laravel, Drupal, headless). Building web and mobile applications that deliver!

Here's how to install Docker and Docker Compose on Ubuntu 22.04.

Let's ensure you're using the latest package information.

sudo apt update

next prepares your system to securely access and install software from additional sources beyond the default ones.

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
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
sudo apt update
 apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker

How To Install and Use Docker Compose on Ubuntu 22.04

mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose