ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Docker 테스트 환경 구축
    Docker 2020. 5. 18. 16:18

    1. VirturlBox 에 Centos 설치

    -- Centos 7.7 설치

    IP : 192.168.137.51
    서버넷 : 255.255.255.0

    2. Docker Install - 저장소를 사용하여 설치

    -- 참고 사이트
    https://docs.docker.com/engine/install/centos/

    -- 이전 버전 제거

    [root@linux-docker ~]# yum remove docker \
                      docker-client \
                      docker-client-latest \
                      docker-common \
                      docker-latest \
                      docker-latest-logrotate \
                      docker-logrotate \
                      docker-engine

    -- Centos 7.7 설치-- 리포지토리 설정

    [root@linux-docker ~]# yum install -y yum-utils
    
    [root@linux-docker ~]# yum-config-manager \
        --add-repo \
        https://download.docker.com/linux/centos/docker-ce.repo

    -- DOCKER ENGINE 설치

    [root@linux-docker ~]# yum install docker-ce docker-ce-cli containerd.io

    -- Docker Daemon 시작

    [root@linux-docker ~]# systemctl start docker

    -- Docker 버전 확인

    [root@linux-docker ~]# docker version
    Client: Docker Engine - Community
     Version:           19.03.8
     API version:       1.40
     Go version:        go1.12.17
     Git commit:        afacb8b
     Built:             Wed Mar 11 01:27:04 2020
     OS/Arch:           linux/amd64
     Experimental:      false
    
    Server: Docker Engine - Community
     Engine:
      Version:          19.03.8
      API version:      1.40 (minimum version 1.12)
      Go version:       go1.12.17
      Git commit:       afacb8b
      Built:            Wed Mar 11 01:25:42 2020
      OS/Arch:          linux/amd64
      Experimental:     false
     containerd:
      Version:          1.2.13
      GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
     runc:
      Version:          1.0.0-rc10
      GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
     docker-init:
      Version:          0.18.0
      GitCommit:        fec3683
    

    -- Docker 테스트
    아래 명령어를 실행하면 hello-world 이미지를 hub 에서 다운로드 후 로컬에서 컨테이너를 실행하고 메시지를 출력한다.

    [root@linux-docker ~]# docker run hello-world
    
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    
    To generate this message, Docker took the following steps:
     1. The Docker client contacted the Docker daemon.
     2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
        (amd64)
     3. The Docker daemon created a new container from that image which runs the
        executable that produces the output you are currently reading.
     4. The Docker daemon streamed that output to the Docker client, which sent it
        to your terminal.
    
    To try something more ambitious, you can run an Ubuntu container with:
     $ docker run -it ubuntu bash
    
    Share images, automate workflows, and more with a free Docker ID:
     https://hub.docker.com/
    
    For more examples and ideas, visit:
     https://docs.docker.com/get-started/

    'Docker' 카테고리의 다른 글

    Docker 명령어 - 개요  (0) 2020.05.18
Designed by Tistory.