Docker

Docker Installation

김모우 2020. 10. 25. 15:38
728x90
반응형

1. Use packages provided by distro

  : RHEL, Fedora, CentOS, ORacle Linux, SLES, Debian, Ubuntu, etc...

 

2. Use packages from Docker

  # curl -sSL https://get.docker.com/ |sh

  : https://yum.dockerproject.org/ for Centos, Fedora, OpenSUSE, and Oracle Linux

  : https://apt.dockerproject.org/ for Debian and Ubuntu

 

3. Use docker-machine

  : Drivers for: EC2, Azure, Digital Ocean, Exoscale, GCP

  : Openstack, Rackspace, VirtualBox, VMware, Cloud, Vmware Vsphere etc..

 

4. Installing Docker in CentOS 

  # sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine

  # yum -y install -y yum-utils device-mapper-persistent-data lvm2

  # yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

  # yum install docker-ce docker-ce-ci containerd.io

  # yum list docer-ce --showduplicates |sort -r

  # yum install docker-ce-<Version String> docker-ce-cli-<Version String> containerd.io

  # systemctl start docker

 

  - Install from a package

  : .rpm 파일 다운로드

  # yum install /path/to/package.rpm

  # systemctl start docker

 

  - Install using the convenience script

  # curl -fsSL https://get.docker.com -o get-docker.sh

  # sudo sh get-docker.sh

 

5. Installing Docker in Ubuntu 

 

  - Setup repo

  # apt-get remove docker docker-engine docker.io containerd runc

  # apt-get update

  # apt-get install apt-transport-https ca-certificates curl gnupg-agent \ software-properties-common

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

  # apt-key fingerprint 0EBFCD88

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

 

  - Install Docker CE

  # apt-get update

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

 

  - Install from a package

  # .deb파일 다운로드

  # dpkg -i /path/to/package.deb

 

  - Install using the convenience script

  # curl -fsSL https://get.docker.com -o get-docker.sh

  # sudo sh get-docker.sh

728x90
반응형

'Docker' 카테고리의 다른 글

Docker 개념 이해  (0) 2023.03.01
Docker - Container 전체 종료, 삭제  (0) 2022.07.29