Docker, Docker Compose 설치

uxmin·2022년 12월 13일
0
post-thumbnail

설치환경: Ubuntu 20.04

Repo 설정

sudo apt-get update && upgrade
sudo apt-get install ca-certificates curl gnupg lsb-release
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

Docker 설치

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker --version
# Docker version 20.10.21, build baeda1f

Docker Compose 설치

sudo apt-get update
sudo apt-get install docker-compose-plugin
docker compose version
# Docker Compose version v2.12.2



* sudo 없이 docker 명령어를 사용하는 방법

sudo usermod -aG docker $USER
sudo -su $USER
profile
Back-end Developer

0개의 댓글