Home CentOS7CentOS7 CentOS7 도커 설치 순서

CentOS7 도커 설치 순서

by maxblog
0 comment

CentOS7에 도커를 설치할 때는 다음과 같은 순서로
설치하면 금방 설치를 할 수 있다.
사용방법과 다양한 팁은 계속 등록할 예정이다.

yum-util 설치
yum install -y yum-utils

Docker 저장소 추가
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Docker 설치
yum install docker-ce docker-ce-cli containerd.io -y

Docker 시작
systemctl start docker

Docker 시작 등록
systemctl enable docker

Docker 확인
systemctl status docker

다음은 도커에 CentOS를 설치하고 설치한 CentOS에 접속하는 방법이므로
참고한다. 기본적으로 현재 CentOS8 버전이 깔리고 있다.

Docker 버전 확인
docker -v

Docker 컨테이너 리스트 보기
docker container ls


Docker CentOS 설치
docker pull centos

Dosker CentOS 접속
docker run -i -t centos /bin/bash

CentOS8 버전 확인
cat /etc/os-release

도커에 CentOS8을 지우고 CentOS7 버전을 설치하려면
다음의 순서를 참고해서 하면 잘 된다.

Docker 이미지 리스트 보기
docker image ls

Docker 이미지 강제삭제
docker image rm 5d0da3dc9764 -f

Docker에 CentOS7 최신버전 설치
docker pull centos:7.9.2009

Docker 이미지 리스트 보기
docker image ls

Docker에 설치한 CentOS7 으로 접속
docker run -i -t centos:7.9.2009 /bin/bash

좋아할만한 추천 글

Leave a Comment

Soledad is the Best Newspaper and Magazine WordPress Theme with tons of options and demos ready to import. This theme is perfect for blogs and excellent for online stores, news, magazine or review sites.

Buy Soledad now!

Edtior's Picks

Latest Articles

ⓒ 2023.  FUNCOM all rights reserved.