본문 바로가기
개발/DevOps

Docker를 설치해보자

by leedonggeun 2022. 11. 24.
본 주제는 Cent OS 7.9 64bit 환경에서 작성하였습니다.
편의상 root 계정으로 진행하며, 혹여 별도의 사용자로 진행하신다면 적절한 권한이 필요합니다.
또한, docker-ce 버전을 사용합니다.

도커 설치하기

CentOS의 패키지 매니저 yum을 통해 설치하는 가이드입니다.

1. Docker Repository 추가

[root@server-01 /]# wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo

2. Docker 설치

[root@server-01 /]# yum install -y docker-ce

위 그림과 같이 docker-ce 패키지를 설치하기 시작한다.

3. Docker 서비스 시작

[root@server /]# systemctl start docker
[root@server /]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-11-24 13:10:40 KST; 2s ago
     Docs: https://docs.docker.com
 Main PID: 26700 (dockerd)
    Tasks: 8
   Memory: 87.3M
   CGroup: /system.slice/docker.service
           └─26700 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Nov 24 13:10:39 server dockerd[26700]: time="2022-11-24T13:10:39.178368427+09:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Nov 24 13:10:39 server dockerd[26700]: time="2022-11-24T13:10:39.178394295+09:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil>...l>}" module=grpc
Nov 24 13:10:39 server dockerd[26700]: time="2022-11-24T13:10:39.178406278+09:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Nov 24 13:10:39 server dockerd[26700]: time="2022-11-24T13:10:39.271911718+09:00" level=info msg="Loading containers: start."
Nov 24 13:10:39 server dockerd[26700]: time="2022-11-24T13:10:39.878884456+09:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to...rred IP address"
Nov 24 13:10:40 server dockerd[26700]: time="2022-11-24T13:10:40.081386335+09:00" level=info msg="Loading containers: done."
Nov 24 13:10:40 server dockerd[26700]: time="2022-11-24T13:10:40.181959626+09:00" level=info msg="Docker daemon" commit=3056208 graphdriver(s)=overlay2 version=20.10.21
Nov 24 13:10:40 server dockerd[26700]: time="2022-11-24T13:10:40.182145646+09:00" level=info msg="Daemon has completed initialization"
Nov 24 13:10:40 server systemd[1]: Started Docker Application Container Engine.
Nov 24 13:10:40 server dockerd[26700]: time="2022-11-24T13:10:40.282367836+09:00" level=info msg="API listen on /var/run/docker.sock"
Hint: Some lines were ellipsized, use -l to show in full.

4. Docker 설치 확인

[root@private-my-server ~]# docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
  scan: Docker Scan (Docker Inc., v0.21.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.21

 ...
 ..
 .

5. 마치며...

Yum을 통한 docker ce를 설치하는 법을 알아보았습니다.
아직 많이 미숙하지만 숙련될 수 있도록 많이 학습하고 포스팅할 예정입니다.

'개발 > DevOps' 카테고리의 다른 글

Docker Swarm 환경에서 자원 할당을 해보자.  (0) 2023.01.29
Docker Swarm이란 무엇일까?  (0) 2022.11.25
Docker란 무엇일까?  (0) 2022.11.23
젠킨스 버전 업데이트하기  (0) 2022.11.07
젠킨스 Jenkins  (0) 2022.11.03

댓글