리눅스

centos docker 설치 및 삭제

Soyeon0111 2022. 8. 29. 20:41
반응형
  • 실행되어 있는 docker container 모두 삭제 후 작업

 

  • 기존 docker 삭제
$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

 

  • docker 설치
$ sudo yum install -y yum-utils
$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

$ yum install docker-ce docker-ce-cli containerd.io
$ yum list docker-ce --showduplicates | sort -r
$ sudo yum install docker-ce-20.10.9-3.el7 docker-ce-cli-20.10.9-3.el7 containerd.io

$ sudo systemctl start docker

 

  • docker 삭제
$ sudo systemctl stop docker
$ sudo yum remove docker-ce docker-ce-cli containerd.io
반응형