1. 최신 도커를 설치하기 전, 기존에 설치된 도커를 지운다
$ sudo apt-get remove docker docker-engine docker.io containerd runc
Code language: JavaScript (javascript)
2. 도커 저장소추가
2.1. APT 패키지 업데이트
$ sudo apt update
2.2. 추가 APT 패키지 설치
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
Code language: JavaScript (javascript)
2.3. 도커 저장소 공식 GPG 키 추가
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Code language: JavaScript (javascript)
2.4. 저장소 추가
2.4.1. AMD64/x86_64
$ 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
Code language: PHP (php)
2.4.2. ARM64
$ echo \
"deb [arch=arm64 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
Code language: PHP (php)
2.4.3. ARMHF
$ echo \
"deb [arch=armhf 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
Code language: PHP (php)
3. Docker 엔진 설치
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Code language: JavaScript (javascript)
4. docker 그룹에 사용자 계정 추가
$ sudo usermod -aG docker $USER
Code language: PHP (php)
https://docs.docker.com/engine/install/ubuntu/