O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Dockerize WordPress on Mac/Windows

1.534 visualizações

Publicada em

How to dockerize WordPress on Mac/Windows for the purpose of development. The fundamentals and advantages of Docker and what kind of tools we can use.

Publicada em: Tecnologia
  • Seja o primeiro a comentar

Dockerize WordPress on Mac/Windows

  1. 1. DOCKERIZE WORDPRESS ON MAC/WINDOWS WordCamp Kansai 2016
  2. 2. WordPress core contributor Ruby on Rails contributor Wocker developer Bathe developer Frasco developer Web & graphic designer Programmer Kite KITERETZ inc. CEO & Funder kite.koga ixkaito ixkaito
  3. 3. HOW MANY PEOPLE KNOW DOCKER?
  4. 4. HOW MANY PEOPLE HAVE USED DOCKER?
  5. 5. WHAT IS DOCKER?
  6. 6. PACKAGE YOUR APPLICATION INTO A STANDARDIZED UNIT FOR SOFTWARE DEVELOPMENT Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.
  7. 7. - Lightweight - Open - Secure by default ADVANTAGES OF DOCKER
  8. 8. COMPARING CONTAINERS AND VIRTUAL MACHINES
  9. 9. VIRTUAL MACHINES Virtual machines include the application, the necessary binaries and libraries, and an entire guest operating system -- all of which can amount to tens 
 of GBs.
  10. 10. DOCKER (CONTAINERS) Containers include the application and all of its dependencies --but share the kernel with other containers, running as isolated processes in user space on the host operating system. Docker containers are not tied to any specific infrastructure: they run on any computer, on any infrastructure, and in any cloud.
  11. 11. VIRTUAL MACHINES DOCKER (CONTAINERS)
  12. 12. HOW TO USE DOCKER ON MAC/WINDOWS?
  13. 13. 1. VIRTUALBOX + VAGRANT
  14. 14. Boot2Docker RancherOS Barge OS Version 1.11.2 0.4.5 2.1.5 Size 35 MB 31 MB 13 MB Kernel 4.4.12 4.2.8 4.4.14 User Land Tiny Core Linux v7.1 Buildroot(glibc) + BusyBox v1.24.1 Buildroot(glibc) + BusyBox v1.24.2 Docker 1.11.2 1.10.3 1.9.1~ Storage Driver aufs, etc. overlay, etc. overlay TLS ✓ ✓ ✓ Vagrant box (Third party) 0.4.1 ~ 0.4.3 ✓ VirtualBox SF 5.0.20 - 5.0.24 NFS Mount (Third party) (rsync) ✓ xhyve ✓ ✓ ✓ Boot Time ~ 15s ~ 15s 5s ~ 10s LIGHTWEIGHT DOCKER HOSTS FOR VAGRANT https://gist.github.com/ailispaw/da3ea53c1f42569770e0
  15. 15. 2. DOCKER TOOLBOX
  16. 16. WHAT’S IN THE TOOLBOX - Docker Engine - Docker Compose - Docker Machine - Kitematic
  17. 17. KITEMATIC - Docker GUI - Fast and Easy Setup - Docker Hub Integration - Seamless Experience Between CLI and GUI
  18. 18. 3. DOCKER FOR MAC/WINDOWS
  19. 19. WHAT’S IN DOCKER FOR MAC/WINDOWS - Docker Engine - Docker CLI Client - Docker Compose - Docker Machine
  20. 20. HOW TO DOCKERIZE WORDPRESS? For development only (without Docker Compose)
  21. 21. DOCKERFILE, DOCKER IMAGE, AND DOCKER CONTAINER - Write Dockerfiles - Build Docker images from Dockerfiles - Run Docker containers from Docker images
  22. 22. WHAT DO WE NEED IN DOCKER IMAGES - Web server - PHP - MySQL - WordPress Core - WP-CLI (recommended)
  23. 23. BEST PRACTICES FOR WRITING DOCKERFILES - Containers should be ephemeral - Use a .dockerignore file - Avoid installing unnecessary packages - Run only one process per container - Minimize the number of layers - Sort multi-line arguments - Build cache
  24. 24. FROM A DOCKERFILE https://github.com/wckr/wordpress-dockerfile $ docker build https://github.com/wckr/wordpress-dockerfile.git
  25. 25. FROM DOCKER HUB
  26. 26. DOCKER HUB Docker Hub is a cloud hosted service from Docker that provides registry capabilities for public and private content.
  27. 27. USING DOCKER CLI $ docker pull wocker/wordpress
  28. 28. FROM KITEMATIC
  29. 29. THANK YOU!

×