- 다운로드전 필요 패키지 설치

 

sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
  • apt-transport-https : 패키지 관리자가 https를 통해 데이터 및 패키지에 접근할 수 있도록 한다.
  • ca-certificates : 인증서 기반의 SSL 통신을 가능하게 해준다.
  • curl : 서버와 통신할수 있는 커맨드 툴
  • software-properties-common : 개인 소프트웨어 패키지 저장소.
                                            우분투 공식 저장소에 없는 패키지들을 받을 때 사용

- 도커 저장소 및 Key 추가

 

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

 

  • s ( slient ) : 진행로그를 표시하지 않음
  • apt-key : 패키지 인증시 사용할 키를 추가한다.

 

※ Curl 명령어 실패

 

더보기

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
gpg: no valid OpenPGP data found.

1. https://curl.haxx.se/ca/cacert.pem 에서 인증서를 받아 적용하거나

2. -k 옵션으로 인증서 검증 스킵

 


- Repository 경로 추가하기 ( PPA )

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

 

- apt update

 

sudo apt-get update

※ docker update 시, 인증서 에러 발생. 프록시에 사용할 인증서를 추가해주자

 

 

ㅁ 인증서를 구한다음에 openssl을 통해 crt 확장자로 바꿔준다.

openssl x509 -in ABC.pem -inform pem -out ABC.crt

 

ㅁ /usr/share/ca-certificates/extra 디렉토리 생성후, 변환된 crt 인증서 이동

 

ㅁ 인증서 패키지 reconfig후 해당 인증서 추가.

sudo dpkg-reconfigure ca-certificates 

- 도커 설치 및 확인

 

sudo apt install docker-ce
sudo systemctl status docker

 

 

 

참조 ( https://roseline124.github.io/kuberdocker/2019/07/17/docker-study02.html )

'IT > 도커도커' 카테고리의 다른 글

(5) 도커 Hello World - 웹페이지  (0) 2021.07.22
(4) 도커 Hello World  (1) 2021.07.20
(3) 도커 명령어  (0) 2021.07.19
(2) 컨테이너 및 도커  (0) 2021.07.14
(0) Oracle VM 을 통한 Ubuntu 서버 설치  (1) 2021.06.29

+ Recent posts