SRE 讀書會 #3 - 重新認識 Docker 容器

SRE 讀書會 #3 - 重新認識 Docker 容器

5a84ea9a0afaca03be45b87dde58e51c?s=128

Kyle Bai

March 21, 2019
Tweet

Transcript

  1. @k2r2bai 重新認識 Docker 容器 SRE 讀書會 #3

  2. @k2r2bai

  3. @k2r2bai

  4. @k2r2bai

  5. @k2r2bai

  6. @k2r2bai

  7. @k2r2bai

  8. @k2r2bai

  9. @k2r2bai Cloud native computing uses an open source software stack

    to be: • Containerized. • Dynamically orchestrated. • Microservices oriented. • Service meshes • Immutable infrastructure • Declarative APIs What is ‘Cloud Native’(aka K8s Native)?
  10. @k2r2bai Docker acquired by Micro$oft

  11. Virtualization

  12. @k2r2bai • 沒有隔離 • 沒有命名空間 • 共⽤用常⾒見見的函式庫 • ⾼高耦合的應⽤用程式與作業系統 Bare-metal

    Machines kernel libs app app app app
  13. @k2r2bai • 隔離性⾼高 • 效能會損失 • 同樣有⾼高耦合的應⽤用程式與作業系統 • 多虛擬機管理理效率差 •

    啟動時間慢 • 系統映像檔容量量較肥 • 粒度粗 Virtual Machines app libs kernel libs app app kernel app libs libs kernel kernel 作業系統層級
  14. @k2r2bai • 效能佳 • 透過 namespace 隔離網路路、UID 等 • 與

    OS Kernel ⾼高耦合 • 啟動時間快 • 應⽤用映像檔容量量較⼩小(⼩小⾄至 10 MB),攜帶性佳 • 粒度細,利利⽤用密度提升 Containers(OS-Level Virtualization) libs app kernel libs app libs app libs app 應⽤用程式層級
  15. @k2r2bai • 取虛擬機與容器之間的特性平衡 • 輕量量的虛擬機環境 • 或是實作在 User namespace •

    gVisor • Kata containers • Firecracker Hpyervisor-based Containers
  16. Docker

  17. @k2r2bai What is Docker?

  18. @k2r2bai

  19. @k2r2bai

  20. @k2r2bai

  21. @k2r2bai

  22. @k2r2bai

  23. @k2r2bai

  24. @k2r2bai How "docker exec" works?

  25. @k2r2bai How "docker exec" works?

  26. @k2r2bai How "docker exec" works?

  27. @k2r2bai docker run -v /test docker run -v /home:/test >>>>>>

    >>>>>> /var/lib/docker/volumes/[VOLUMME_ID]/_data host /home to container /test Linux bind mount
  28. @k2r2bai KAIREN OUT!! THANK YOU!!!