본문 바로가기
컨테이너/도커

[도커 설치] Docker Installation on Ubuntu:20.04

by sangyeon 2021. 10. 24.
728x90

Docker 설치시에는 반드시 root 계정으로 설치를 진행해야 한다.

 

1. Docker Install

> docs.docker.com을 참조하여 설치 진행

> Download and install

> Docker for Linux

> Install on Linux 

https://docs.docker.com/engine/install/ubuntu/

 

Install Docker Engine on Ubuntu

 

docs.docker.com

Set up the repository 부터 차근차근 따라해 가면 된다.

 

1-1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:

$ apt-get update

$ sudo apt-get install \

ca-certificates \

curl \

gnupg \

lsb-release 

 

1-2. Add Docker’s official GPG key:

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

 

1-3. Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.

$ echo \
  "deb [arch=$(dpkg --print-architecture) 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

 

 

1-4. Install Docker Engine

$ apt-get update

$ apt-get install docker-ce docker-ce-cli containerd.io

 

 

1-5. Docker 설치 확인

$ systemctl status docker

 

1-6. Docker Run Test

$ sudo docker run hello-world

> 이미지 Pulling

 

도커 설치 완료..

 

다음은 Kubernetes 설치!!

728x90