본문 바로가기
IT/Linux

Ubuntu 18.04에 Docker 설치

by 혁이 2021. 8. 25.
반응형

패키지 리스트 업데이트

#sudo apt-get update

 

https를 경유하여 리포지토리를 사용할 수 있도록 패키지 설치

#sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

 

Docker의 공식 GPG 키를 등록.

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

 

Repository 등록

#sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"


Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:2 http://kr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:5 http://kr.archive.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done

 

※ Repository를 잘못 입력하였을 경우 /etc/apt/sources.list에서 확인 및 수정이 가능

deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable

[/etc/apt/sources.list 파일 내용 중 일부]

 

apt 업데이트 실행

#sudo apt-get update

 

Docker 설치

#sudo apt-get install docker-ce

설치가 끝나면 자동으로 Docker가 시작됩니다.

 

반응형

'IT > Linux' 카테고리의 다른 글

Docker 명령어로 "Hello world" 출력하기  (0) 2021.08.26
Ubuntu 18.04 Network Address 수동 설정  (0) 2021.08.25
리눅스에 하마치 설치하기  (0) 2017.04.21