도커(Docker)

Oracle Cloud Ubuntu 20.04 + docker 설치

낙산암 2022. 7. 9. 22:50

1. sudo apt-get update

2. sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release (한줄) sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

 

3. Docker와 암호화 통신을 위한 GPG 설정

 

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

 

4. OS 설치정보 확인 및 stable Repository 설치

dpkg -s libc6 | grep Arch 혹은 uname -a

 

x86_64 / amd64 일 경우 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

 

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

 

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

 

 

5. Docker Install

sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io

 

(특정버전 설치시, 5:18.09.1~3-0~ubuntu-xenial) sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io