Upgrade to Pro — share decks privately, control downloads, hide ads and more …

140810_Docker-Docker.Hub

 140810_Docker-Docker.Hub

140810 珠海 金山 内部分享中
马道长的分享

Zoom.Quiet

August 12, 2014
Tweet

More Decks by Zoom.Quiet

Other Decks in Technology

Transcript

  1. 1. Docker Chinese community 2. Docker & Docker Governance 3.

    Namespaces & Cgoups 4. Storage Drive Kernel -> AUFS 5. Docker Hub & Docker Registry 6. Docker Registry API 7. Community Version Docker Hub 8. Docker Remote API 9. Dockerfile 10. OpenSource Projects Base Docker Agenda
  2. Who am I ? ⻢马全⼀一 Meaglith Ma Docker 中⽂文社区创始⼈人 dockboard.org

    & docker.cn [微博] @⻢马全⼀一 [G+] google.com/+MeaglithMa [Twitter] @genedna [Email] [email protected] [Book] Docker Open Book github.com/ genedna/dockeropenbook
  3. System Virtualization VS Container Virtualization Hardware' Host'Kernel' Hypervisor(VMM)' Guest' Kernel'

    Binaries/' Libraries' App' System Virtualization Guest' Kernel' Binaries/' Libraries' App' Guest' Kernel' Binaries/' Libraries' App' Hardware' Host'Kernel' Binaries/' Libraries' App' Binaries/' Libraries' App' Binaries/' Libraries' App' Container Virtualization
  4. DGAB -> Docker Governance Advisory Board 1.DGAB or Fond? 2.Seats

    for commit, no fee or sponsorship. 3.Membership for 12 months, 24 months max. 4.DGAB is not charge.
  5. What’s namespaces? pid net ipc mnt uts user 1. pid

    namespace 2. net namespace 3. mnt namespace 4. uts namespace 5. ipc namespace
  6. What’s AUFS? /base boot bin lib lib64 usr sbin /data

    www /union boot bin lib lib64 usr sbin www mount -t aufs -o br=/base=ro:/data=rw none /union
  7. Docker Local Storage Path -> /var/lib/docker diff 842b5a724d2d) f106b5d7508a) 1e8abad02296)

    511136ea3c5a) …) layer 842b5a724d2d) f106b5d7508a) 1e8abad02296) 511136ea3c5a) …) mnt 842b5a724d2d) f106b5d7508a) 1e8abad02296) 511136ea3c5a) …) mount -t aufs –o br= diff/511136ea3c5a=ro: diff/1e8abad02296=ro: diff/f106b5d7508a=ro: diff/842b5a724d2d=rw none mnt/842b5a724d2d
  8. Docker Registry API -> Pull EPDLFS霄꡼)VC剪⸉㐼SFQPTJUPSZ涸JNBHFT⥌䜂(&5WSFQPTJUPSJFTVTFSOBNF SFQPTJUPSZJNBHFT EPDLFS霄꡼SFHJTUSZ剪⸉㐼SFQPTJUPSZ涸UBHT⥌䜂(&5WSFQPTJUPJFTVTFSOBNF SFQPTJUPSZUBHT 呏䰘SFQPTJUPSZ涸UBHT⚥JNBHF⥌䜂鵳遤䗄梠

    蜦》JNBHF涸"ODFTUSZ⥌䜂(&5WJNBHFTJNBHF@JEBODFTUSZ 蜦》JNBHF涸+40/侨䰘(&5WJNBHFTJNBHF@JEKTPO 蜦》JNBHF涸-BZFS俒⟝(&5WJNBHFTJNBHF@JEMBZFS
  9. Docker Remote API -> Image & Container 1045JNBHFTDSFBUF (&5JNBHFT OBNF

    IJTUPSZ 1045JNBHFT OBNF JOTFSU (&5JNBHFT OBNF KTPO (&5JNBHFTKTPO 1045JNBHFT OBNF QVTI %&-&5&JNBHFT OBNF  (&5JNBHFTTFBSDI 1045JNBHFT OBNF UBH 1045DPOUBJOFST JE BUUBDI (&5DPOUBJOFST JE DIBOHFT 1045DPOUBJOFST JE DPQZ 1045DPOUBJOFSTDSFBUF (&5DPOUBJOFST JE FYQPSU (&5DPOUBJOFST JE KTPO 1045DPOUBJOFST JE LJMM (&5DPOUBJOFSTKTPO (&5DPOUBJOFST JE MPHT 1045DPOUBJOFST JE QBVTF %&-&5&DPOUBJOFST JE  1045DPOUBJOFST JE SFTUBSU 1045DPOUBJOFST JE TUBSU 1045DPOUBJOFST JE TUPQ (&5DPOUBJOFST JE UPQ 1045DPOUBJOFST JE VOQBVTF 1045DPOUBJOFST JE XBJU
  10. # VERSION 0.1 # DOCKER-VERSION 0.7.3 # AUTHOR: Sam Alba

    <[email protected]> # DESCRIPTION: Image with docker-registry project and dependecies # TO_BUILD: docker build -rm -t registry . # TO_RUN: docker run -p 5000:5000 registry # Latest Ubuntu LTS from ubuntu:14.04 # Update run apt-get update run apt-get -y upgrade # Install pip run apt-get -y install python-pip # Install deps for backports.lzma (python2 requires it) run apt-get -y install python-dev liblzma-dev libevent1-dev add . /docker-registry add ./config/boto.cfg /etc/boto.cfg # Install core run pip install /docker-registry/depends/docker-registry-core # Install registry run pip install file:///docker-registry#egg=docker-registry[bugsnag] env DOCKER_REGISTRY_CONFIG /docker-registry/config/config_sample.yml env SETTINGS_FLAVOR dev expose 5000 cmd exec docker-registry What’s Dockerfile ?
  11. OpenSource Projects Base Docker 1.PaaS : Tsuru/Octohost/Deis/StackDock/Flynn/ tusum/Dokku/Spin-Docker/Peas/Tutum 2.Private Registry:

    quay.io/orchard/docker.cn 3.OS: CoreOS/Atomic 4.CI: Drone/Shippable 5.Book: dockerbook.com 6.Kubernetes