728x90
만약, 기존에 도커가 설치되어 있다면 삭제를 먼저 해주기.
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
도커 엔진을 설치하기 전에, 먼저 Docker repository를 설치해줘야 한다.
설치 이후, 해당 repository를 이용해서 Docker를 설치, 업데이트 할 수 있다.
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
아래 명령어로 도커를 설치할 수 있다. but 이 명령어는 가장 최신버전의 docker가 설치된다!
yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin
특정 버전으로 설치하고 싶다면,
아래와 같이 먼저 설치 가능한 도커 version 리스트를 확인하자.
yum list docker-ce --showduplicates | sort -r
그리고 내가 설치하고 싶은 버전으로 아래와 같이 설치명령을 해주면 된다.
yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-compose-plugin
만약, 3:20.10.6-3.el8 버전을 설치하고자 한다면
yum install docker-ce-20.10.6 docker-ce-cli-20.10.6 containerd.io docker-compose-plugin
나는 이걸로 함!
yum install -y docker-ce-17.09.0.ce-1.el7.centos docker-ce-cli-17.09.0.ce-1.el7.centos
도커 서비스 등록
systemctl enable docker
systemctl status docker
도커가 설치되었는지 확인하기!
systemctl start docker
docker run hello-world
system
728x90
'Docker' 카테고리의 다른 글
컨테이너/이미지 모두 삭제 명령어 (0) | 2024.04.09 |
---|---|
docker-compose (0) | 2024.04.09 |
도커 / 컨테이너 / 이미지 (0) | 2024.04.03 |
Docker compose & Kubernetes (0) | 2024.03.07 |
멀티 컨테이너 구현2 (1) | 2024.01.31 |