1. yum-config-manager를 사용하기 위해서 yum-utils를 설치

  • 커널 수정을 위해 아래의 명령어를 입력하여 yum-utils 를 설치
    $ yum install -y yum-utils

 

2. yum-config-manager 사용

  • yum 리포지토리의 URL을 알고 있으면 yum-config-manager를 사용하여 yum repository 구성 파일 생성
  • /etc/yum.repos.d/docker-ce.repo 파일이 추가
    $ yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

 

3. 현재 활성화 된 Yum Repository 목록을 확인

  • Yum Repository에 추가된 docker-ce-repo를 확인 가능
    $ yum repolist
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.kakao.com
    * extras: mirror.kakao.com
    * updates: mirror.kakao.com
    repo id repo name status
    base/7/x86_64 CentOS-7 - Base 10,072
    docker-ce-stable/7/x86_64 Docker CE Stable - x86_64 118
    extras/7/x86_64 CentOS-7 - Extras 498
    updates/7/x86_64 CentOS-7 - Updates 2,542

 

4. Yum Repository 목록에 있는 docker-ce를 설치

  • docker-ce를 설치
    $ yum -y install docker-ce

 

5. docker 실행 및 상태 확인

  • docker 서비스 실행 및 영구 실행
    $ systemctl start docker
    $ systemctl enable docker
    $ systemctl status docker

 

6. docker 프로세스 실행 확인

  • 실행 중인 docker 프로세스 확인
    $ ps -ef| grep docker
    root       8322      1  0 13:41 ?        00:00:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

 

+ Recent posts