Docker и Docker Compose - установка на Ubuntu 20.04 - latest version

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Перейти к:навигация, поиск

Docker и Docker Compose - установка на Ubuntu 20.04 - latest version

Установка самой последней версии docker и docker-compose на Ubuntu 20.04:

# apt update
# apt install ca-certificates curl  gnupg  gpg lsb-release -y
# mkdir -m 0755 -p /etc/apt/keyrings
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
# apt-get update
# apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
# systemctl enable docker


Проверяем версию docker-compose:

~# dpkg -l | grep docker-compose
ii  docker-compose-plugin                2.16.0-1~ubuntu.20.04~focal       amd64        Docker Compose (V2) plugin for the Docker CLI.

Либо такой командой по ssh:

# docker compose version
Docker Compose version v2.21.0