[CentOS] CentOS에 Dokcer 설치

MOON·2021년 6월 10일
0
post-thumbnail

도커(Docker)

  • 컨테이너 기술을 지원하는 다양한 프로젝트 중 하나
  • 다양한 운영체제에서 사용 가능(리눅스, 윈도우, MacOS 등)
  • 리눅스의 네임 스페이스와 cgroups와 같은 커널 기능을 사용하여 가상화


1. Docker 설치

// yum package 업데이트
# yum -y update

// Docker와 Docker-Registry 설치
# yum -y install docker docker-registry

2. Docker 자동 실행 설정

// 부팅 시 실행하도록 등록
# systemctl enable docker.service

// 도커 실행
# systemctl start docker.service

// 도커 상태 확인
# systemctl status docker.service
// systemctl status docker.servuce 명령어 입력 시
// 실행 상태를 확인할 수 있다.

docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2021-06-07 08:38:13 UTC; 2 days ago
     Docs: http://docs.docker.com
 Main PID: 1285 (dockerd-current)
   CGroup: /system.slice/docker.service
           ├─ 1285 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userl...
           ├─ 1447 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/l...
           ├─13141 /usr/libexec/docker/docker-proxy-current -proto tcp -host-ip 0.0.0.0 -host-port 1521 -container-ip 172.17.0.2 -container-port 1521
           └─13147 /usr/bin/docker-containerd-shim-current 960d9d099e4f6c6b450b0f8c5f3f1c570d5947797742ca551ed43a3c293a4b0d /var/run/docker/libcontainerd/960d9d099e4f6c6b450b0f8c5f3f1c57...

Jun 08 01:57:32 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: time="2021-06-08T01:57:32.883810446Z" level=error msg="Handler for POST /v1.26/containers/...rcle11g"
Jun 08 01:57:40 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: found files in /u01/app/oracle/oradata Using them instead of initial database
Jun 08 01:57:40 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: Starting Oracle Net Listener.
Jun 08 01:57:41 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: Starting Oracle Database 11g Express Edition instance.
Jun 08 01:57:48 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]:
Jun 08 01:57:48 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: Database ready to use. Enjoy! ;)
Jun 08 07:33:32 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: time="2021-06-08T07:33:32.098348076Z" level=error msg="Error running exec in container: rp...ory\"\n"
Jun 08 07:33:32 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: time="2021-06-08T07:33:32.101742718Z" level=error msg="Handler for POST /v1.26/exec/5752e8...ntainer"
Jun 08 07:33:37 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: time="2021-06-08T07:33:37.021108587Z" level=error msg="Error running exec in container: rp...ied\"\n"
Jun 08 07:33:37 ip-192-168-1-233.ap-northeast-2.compute.internal dockerd-current[1285]: time="2021-06-08T07:33:37.021634585Z" level=error msg="Handler for POST /v1.26/exec/029b54...ntainer"
Hint: Some lines were ellipsized, use -l to show in full.

0개의 댓글