패키지 최신버전 확인
1
sudo apt-get update && upgrade
필요 패키지 설치
1
2
3
4
5
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
GPG key 추가
1
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Docker Repository 등록
1
2
3
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
Docker 설치
1
2
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
버전 확인
1
sudo docker version
현재 계정 sudo 없이 실행 등록
1
sudo usermod -aG docker $USER