[ Docker ] 도커 설치

이전 버전이 깔려있는 경우 삭제

yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine

디펜던시 패키지 설치

yum 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


하지만 에러를 뱉어낸다..

Error: Package: docker-ce-18.03.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
           Requires: container-selinux >= 2.9


container-selinux 2.9 이상 버전을 설치해줘야 한다는 것..

https://centos.pkgs.org/7/centos-extras-x86_64/container-selinux-2.42-1.gitad8f0f7.el7.noarch.rpm.html

rpm package를 받아서 설치 시도를 하면 아래와 같은 에러가 또 뜬다.


Error: Package: docker-ce-18.03.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
           Requires: pigz

얘는 pigz가 필요함.. ㅠㅠ

https://centos.pkgs.org/7/epel-x86_64/pigz-2.3.4-1.el7.x86_64.rpm.html

서버에 올려서 yum install 해줍니다..

yum install pigz.{version}.rpm

yum install libselinux-utils

yum install container-selinux-{version}.rpm

yum install docker-ce



설치 완료~




댓글