https://docs.docker.com/engine/install/ubuntu/
Install Docker Engine on Ubuntu
docs.docker.com
위의 사이트를 참고해서 작성하였습니다.
전제조건은 아래와 같습니다.
Prerequisites
- Ubuntu Focal 20.04 (LTS)
- Ubuntu Bionic 18.04 (LTS)
우분투에 Docker를 설치하기 위해서
Installation methods
1. Set up the repository
$ sudo apt-get update
$ sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
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
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
Install Docker Engine
Update the apt package index, and install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
위까지 진행했다면 터미널에서 docker의 버전을 확인해보자
docker --version
Compose 설치
compose는 여러 컨테이너를 실행할 수 있는 tool이다. yaml 파일을 통해서 command를 실행하면 여러 container를 실행할 수 있다.
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
실행 권한 주기
$ sudo chmod +x /usr/local/bin/docker-compose
compose 버전 확인
$ docker-compose --version
docker-compose version 1.29.2, build 5becea4c
'Programming > Docker' 카테고리의 다른 글
ubuntu sudo 안붙이고 docker 사용하기 (0) | 2022.06.28 |
---|---|
[Docker] Image를 pull하고 Container 실행하기 (run, attach, start/stop) (0) | 2022.03.27 |
[Docker] Docker Local에서 docker container에 파일 옮기기 (0) | 2022.03.26 |
[Docker] Docker container에서 GPU 사용하기 (0) | 2022.03.25 |
https://docs.docker.com/engine/install/ubuntu/
Install Docker Engine on Ubuntu
docs.docker.com
위의 사이트를 참고해서 작성하였습니다.
전제조건은 아래와 같습니다.
Prerequisites
- Ubuntu Focal 20.04 (LTS)
- Ubuntu Bionic 18.04 (LTS)
우분투에 Docker를 설치하기 위해서
Installation methods
1. Set up the repository
$ sudo apt-get update
$ sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
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
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
Install Docker Engine
Update the apt package index, and install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
위까지 진행했다면 터미널에서 docker의 버전을 확인해보자
docker --version
Compose 설치
compose는 여러 컨테이너를 실행할 수 있는 tool이다. yaml 파일을 통해서 command를 실행하면 여러 container를 실행할 수 있다.
$ sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
실행 권한 주기
$ sudo chmod +x /usr/local/bin/docker-compose
compose 버전 확인
$ docker-compose --version
docker-compose version 1.29.2, build 5becea4c
'Programming > Docker' 카테고리의 다른 글
ubuntu sudo 안붙이고 docker 사용하기 (0) | 2022.06.28 |
---|---|
[Docker] Image를 pull하고 Container 실행하기 (run, attach, start/stop) (0) | 2022.03.27 |
[Docker] Docker Local에서 docker container에 파일 옮기기 (0) | 2022.03.26 |
[Docker] Docker container에서 GPU 사용하기 (0) | 2022.03.25 |