Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker 사용가이드 public v0.1

577 views

Published on

Getting started with Docker

Published in: Engineering
  • DOWNLOAD THAT BOOKS/FILE INTO AVAILABLE FORMAT - (Unlimited) ......................................................................................................................... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes Christian, Classics, Comics, Contemporary, Cookbooks, Art, Biography, Business, Chick Lit, Children's, Manga, Memoir, Music, Science, Science Fiction, Self Help, History, Horror, Humor And Comedy, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS/FILE INTO AVAILABLE FORMAT - (Unlimited) ......................................................................................................................... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes Christian, Classics, Comics, Contemporary, Cookbooks, Art, Biography, Business, Chick Lit, Children's, Manga, Memoir, Music, Science, Science Fiction, Self Help, History, Horror, Humor And Comedy, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes.........ACCESS WEBSITE Over for All Ebooks ..... (Unlimited) ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ...................................ALL FOR EBOOKS................................................. Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ...................................ALL FOR EBOOKS................................................. Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Docker 사용가이드 public v0.1

  1. 1. Docker 사용가이드 rocksea
  2. 2. 1. 목적 2. 개요 3. 설치방법 4. 사용방법 5. Q&A 목차
  3. 3. Docker 도입을 위한 가이드. 1. 목적
  4. 4. 2. 개요 (1/8) 가상화란? - 컴퓨터 리소스를 추상화하는 광범위한 기술. - 전가상화, 반가상화가 존재, 가상화 방식에 따른 Hosted Hypervisor, bare-metal Hypervisor가 존재. - 일반적으로 사용하는 가상화 기술은 x86 프로세서를 가상화 하는 방식을 사용.(Intel, AMD 등) - 각 OS의 X86 CPU 명령어 집합(Instruction Set)의 Operation이 다르기때문에 명령어를 가상화 (instruction set virtualization) 하는 방법, 또는 바이너리를 변환하는 방법이라고 할 수 있다. - CPU VT(Virtualizaion Technology)기능을 지원하지 않으면 사용할수가 없음. (BIOS에서 가능 여부 확인) - Cloud 플랫폼이 대중화되면서 AWS, Openstack등 가상화는 이제 다양한 서버 인프라 구성의 핵심기술.
  5. 5. 2. 개요 (2/8) 그러한 연유로 각 OS이미지엔 CPU 아키텍쳐의 이름이 명시되어있다.
  6. 6. 2. 개요 (3/8) 애플도 Intel CPU(x86 Architecture)를 사용하면서 Windows 사용이 가능해짐. (반대로 Windows에서도 OSX 가상머신 설치가 가능해졌다는 의미)
  7. 7. 2. 개요 (4/8) Docker is Not Virtual Machine
  8. 8. 2. 개요 (5/8) 가상화인듯 가상화아닌 가상화같은 너. 개발환경의 격리 (독립된 프로세스로 실행) H/W 가상화 (독립된 운영체제로 실행)
  9. 9. 2. 개요 (6/8) DevOps의 시대, 중심은 Docker, AWS에서도 공식 지원.
  10. 10. 2. 개요 (7/8) Docker는 가상화가 아닌 Container 기반이다. program -> run -> process image -> run -> container
  11. 11. 2. 개요 (8/8) Docker는 Go언어로 작성되었다. (http://www.slideshare.net/jpetazzo/docker-and-go-why-did-we-decide-to-write-docker-in-go), 초기버전은 LXC(LinuX Container) 기반으로 개발되었으며, Linux에서만 동작하였으나, 현재는 자체 가상머신 docker-machine을 개발하여 다양한 OS (osx, windows)에서도 사용가능하다. (docker-machine = Linux 가상머신) Docker Architecture 구성도
  12. 12. 3. 설치방법 1. Toolbox 다운로드: https://www.docker.com/products/docker-toolbox Tool Box에 포함된 패키지 - Docker CLI client for running Docker Engine to create images and containers - Docker Machine so you can run Docker Engine commands from Mac OS X terminals - Docker Compose for running the docker-compose command - Kitematic, the Docker GUI - the Docker QuickStart shell preconfigured for a Docker command-line environment - Oracle VM VirtualBox Because the Docker Engine daemon uses Linux-specific kernel features, you can’t run Docker Engine natively in Windows (or OS X) (결국 Docker는 Linux 위에서 돌아간다.) 2. 설치 가이드 문서 Windows : https://docs.docker.com/toolbox/toolbox_install_windows/ (64bit 윈도우7 or higher) OSX : https://docs.docker.com/toolbox/toolbox_install_mac/
  13. 13. 4. 사용방법 (1/9) 1. Docker Machine 생성 Linux의 경우 Docker Machine이 필요없으므로 이 부분은 생략 가능하다. - Toolbox설치 후 Docker QuickStart Terminal을 이용하면 Default로 생성된다. - command line으로 생성할경우 $ docker-machine create --driver virtualbox name 2. Docker Machine 접속 - Docker Machine ssh 접속 $ docker-machine ssh name
  14. 14. 4. 사용방법 (2/9) 3. Docker Image 생성 및 조회 Docker Container를 실행하기 위해 Image 생성. - Docker Registry에 등록된 Image를 받는 방법 $ docker pull jenkins - Docker Image 조회 $ docker images
  15. 15. 4. 사용방법 (3/9) 4. Docker Container 실행 및 조회 - Docker Container 실행 $ docker run -u jenkins -p 8080:8080 -p 50000:50000 -v /home/service/jenkins jenkins - Docker Container 조회 $ docker ps -a - Docker Container 시작 $ docker start container-id - Docker Container 종료 $ docker stop container-id
  16. 16. 4. 사용방법 (4/9) 5. Docker Image 원격 저장소 등록 Docker Cloud에 가입한 뒤 원격 저장소를 사용할 수 있다. 기본적으로 Github 사용법과 유사하다. (https://cloud.docker.com/_/dashboard/onboarding) - Docker Container Commit으로 Snapshot 저장 운영중인 Container를 Snapshot을 뜬 후 Image로 저장. $ docker commit container-id -Docker 원격저장소 인증 $ docker login
  17. 17. 4. 사용방법 (5/9) - Docker Image Push Commit한 Image snapshot을 원격 저장소에 Push한다. $ docker push user/repository:tag Commit한 Image snapshot을 원격 저장소에 Push한다. $ docker push user/repository - Docker Image Pull $ docker pull user/repository:tag
  18. 18. 4. 사용방법 (6/9) 6. Dockerfile을 이용한 빌드방법 - Dockerfile 작성 예 FROM ubuntu:14.04 ENV NPM_CONFIG_LOGLEVEL info ENV NVM_VERSION 0.11.1 ENV NODE_VERSION 4.3.1 RUN sed -i 's/# (.*multiverse$)/1/g' /etc/apt/sources.list && sed -i 's/archive.ubuntu.com/ftp.daumkakao.com/g' /etc/apt/sources.list && apt-get update && apt-get -y upgrade && apt-get install -y build-essential && apt-get install -y software-properties-common && apt-get install -y byobu curl git htop man unzip vim wget && rm -rf /var/lib/apt/lists/* RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - RUN apt-get install -y nodejs && apt-get -y install npm RUN mkdir -p /home/service/chat ADD chat /home/service/chat WORKDIR /home/service/chat RUN npm install -d #RUN npm install pm2 -g EXPOSE 8080:8080 CMD [ "nodejs", "index.js" ]
  19. 19. 4. 사용방법 (7/9) - Dockerfile build를 통해 이미지 생성 $ docker build -t nodejs . - 생성된 이미지 확인
  20. 20. 4. 사용방법 (8/9) 7. Docker Compose 사용법. docker-compose를 이용하면 하나의 서비스를 여러개의 Container로 분리하여 운영할 수 있다. (https://docs.docker.com/compose/install/) - docker-compose.yml 작성 예 version: '1' services: redis: image: redis:latest ports: - "6379:6379" restart: always nodejs: image: nodejs:latest ports: - "8080:8080" depends_on: - redis links: - redis restart: always
  21. 21. 4. 사용방법 (9/9) - Container 생성 $ docker-compose up -d - Container 삭제 $ docker-compose down - Container 시작 $ docker-compose start - Container 종료 $ docker-compose stop
  22. 22. 5. Q&A Q&A globalrocksea@gmail.com

×