도커를 시작해보자
도커는 설치 조건이 있다
커널3.1이상
64bit 이상
uname -ar로 내 사양을 확인한다
ayk@hostos2:~$ uname -ar
Linux hostos2 5.4.0-80-generic #90~18.04.1-Ubuntu SMP Tue Jul 13 19:40:02 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
사양 제한에 걸리지 않는다
설치 전 필요한 도구들 설치
ayk@hostos1:~$ sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
apt-transport-https : 패키지 관리자가 https를 통해 데이터 및 패키지에 접근할 수 있도록 한다.
ca-certificates : ca-certificate는 certificate authority에서 발행되는 디지털 서명. SSL 인증서의 PEM 파일이 포함되어 있어 SSL 기반 앱이 SSL 연결이 되어있는지 확인할 수 있다.
curl : 특정 웹사이트에서 데이터를 다운로드 받을 때 사용
software-properties-common : *PPA를 추가하거나 제거할 때 사용한다.
gpg 는 gnu package guide(gpg 키 추가 작업)
도커에서 다운받은 gpg를 내 컴퓨터에 저장해라
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
키 확인
ayk@hostos1:~$ sudo apt-key fingerprint
/etc/apt/trusted.gpg
--------------------
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker@docker.com>
0EBF CD88
도커에서 발행한 키
gpg키가 없는체 docker repository에 추가하면
W: GPG error: https://download.docker.com/linux/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
E: The repository 'https://download.docker.com/linux/ubuntu bionic InRelease' is not signed.
위와 같은 오류 발생
debian 계열의 docker repository 추가후 apt update 진행
ayk@hostos1:~$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
/etc/apt/sources.list 여기 저장
$lsb-release
repository에 내 버전을 정확하게 입력해주기 위해서!!
수동으로 저장하고 싶을경우
/etc/apt/sources.list 여기에 직접 저장하면 된다!!
#도커 에디션(CE 버전과 EE버전이 존재)
ce 버전 설치
sudo apt-get install -y docker-ce
docker version 버전확인!!
ayk@hostos1:~$ docker version
Client: Docker Engine - Community
Version: 20.10.7
API version: 1.41
Go version: go1.13.15
Git commit: f0df350
Built: Wed Jun 2 11:56:40 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
성공적으로 설치가 됐다!!
이제 도커를 시작해보자~~