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 based web hosting

1,248 views

Published on

Docker 의 기본과 Docker 를 기반으로 웹 호스팅을 구축하는 기초에 대해 설명합니다.

Published in: Software

Docker based web hosting

  1. 1. Docker Based Web Hosting 강동혁 donghyeok@shoplic.kr
  2. 2. • (현) 쇼플릭 대표 • 단비랩스 CTO • 맥스트 Senior Researcher • 한솔헬스케어 Dev Team Leader • SK커뮤니케이션즈 과장 • 네트빌 Junior Researcher • Java, PHP, Go, Python, Shell Script, Javascr ipt, Lua, ASP • AWS, Docker, Linux, MySQL 강동혁 2
  3. 3. Apache HTTPD (PHP Module) MySQL /home/hosting_users /foo /bar /shoplic /donghyeok /bradpitt … Web Hosting without Docker Host
  4. 4. Container & Docker • Standardized packaging for software and dependencies • Isolate apps from each other • Share the same OS kernel • Container Orchestration • Kubernetes • Docker Swarm • Mesosphere • Rancher Image source) https://docs.docker.com/get-started/
  5. 5. Docker Basic • Image • Volume • Network
  6. 6. Docker Image • Immutable snapshot of a container • Building an image from a DockerFile via “docker build” • Public repositories like hub.docker.com • Private repository like AWS ECR(Elastic Container Repository)
  7. 7. Image source) https://fizalihsan.github.io/technology/virtualization.html
  8. 8. Image source) https://docs.docker.com/storage/storagedriver
  9. 9. Docker Volume mechanism for persisting data generated by and used by Docker containers Image Source) https://docs.docker.com/v17.09/engine/userguide/storagedriver/imagesandcontainers/
  10. 10. Docker Network • Connecting docker containers together, or containers to non- Docker workloads • Network drivers • Bridge • Overlay • Host • Macvlan • None
  11. 11. Bridge Network Driver Image source) https://blog.docker.com/2016/12/understanding-docker-networking-drivers-use-cases/
  12. 12. Overlay Network Driver Image source) https://blog.docker.com/2016/12/understanding-docker-networking-drivers-use-cases/
  13. 13. Host Network Driver Image source) https://success.docker.com/article/networking
  14. 14. Macvlan Network Driver Image source) https://blog.docker.com/2016/12/understanding-docker-networking-drivers-use-cases/
  15. 15. Host Apache HTTPD (PHP Module) MySQL /home/hosting_users /foo /bar … Web Hosting without Docker
  16. 16. Apache HTTPD MySQL /data/sites /foo /bar Web Hosting with Docker Apache HTTPD MySQL volume volume Host Docker Container
  17. 17. Host Apache HTTPD MySQL Web Hosting with Docker Apache HTTPD MySQL Service Discovery foo.com bar.com /data/sites /foo /bar volume volume
  18. 18. Host Apache HTTPD MySQL Web Hosting with Docker Apache HTTPD MySQL Reverse Proxy foo.com bar.com /data/sites /foo /bar volume volume
  19. 19. Apache HTTPD MySQL Web Hosting with Docker Apache HTTPD MySQL /data/sites /foo /bar volume volume Nginx Host foo.com bar.com
  20. 20. PHP-FPM Web Hosting with Docker PHP-FPM /data/sites /foo /bar volume volume Nginx Host MySQL foo.com bar.com
  21. 21. Thank You 23 fb.com/kangdonghyeok donghyeok@shoplic.kr

×