ติดตั้ง Docker และ Docker-Compose ใน Ubuntu 20.04
ติดตั้ง Docker
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable”
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
sudo usermod -aG docker username
ถ้ามี Error “sudo: setrlimit(RLIMIT_CORE): Operation not permitted” แก้ไขโดย
echo “Set disable_coredump false” >> /etc/sudo.conf
docker -version
ติดตั้ง Docker-Compose
sudo curl -L “https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose –version