ติดตั้ง Docker Compose on Ubuntu 22.04

ติดตั้ง Docker Compose on Ubuntu 22.04

apt update

apt install software-properties-common apt-transport-https ca-certificates lsb-release -y

apt install curl

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

echo "deb [arch=amd64 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

apt update

apt install docker-ce -y

docker version

systemctl status docker

apt install docker-compose -y

curl -L https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

docker compose version