Docker for php developers

PHP Developers meet #15

Jan 16, 2016

Prashant Shrestha

YoungInnovations

About me

- Prashant Shrestha

 

- VP, Business and Technology Innovations, YoungInnovations

 

- Co-founder, YoungInnovations

prash.shrestha@gmail.com

prashant_sh

Topics

  • Introduction and Challenges
  • Introduction to Container and it's underlying technologies
  • Components of Docker
  • Structure of a php application under docker
  • Live Demo

The Challenge

How it used to be

Along came Virtualization

What is Virtualization

Introducing Containers

How Containers work

  • Kernel Namespaces
  • Control Groups (cgroups)
  • Union file systems (aufs, vfs, DeviceMapper)

Kernel Namespaces

This provides a layer of isolation: each aspect of a container runs in its own namespace and does not have access outside it.

 

Kernel Namespaces

Kernel Namespaces

Kernel Namespaces

Control groups (cgroups)

Control groups allow containers to share available hardware resources and, if required, set up limits and constraints

Union file systems

Docker provides an integrated technology suite that enables development and IT operations teams to build, ship, and run distributed applications anywhere.

Docker Architecture

Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers

Docker images

A Docker image is a read-only template which is used to launch Docker containers.

How to build your own images

  • Docker commit
  • Dockerfile

Docker containers

A Docker container holds everything that is needed for an application to run. Each container is created from a Docker image.

Container Layer

Service oriented architecture

Each service runs within a container

Why use docker?

  • Isolation
  • Scalable
  • Portable
  • Lightweight
  • Fast

Docker workflow and patterns

Single App Container

Not Recommended

Container Groups

Separate Containers

Multiple PHP Projects

Live Demo

Questions?

Docker for php developers

By Prashant Shrestha

Docker for php developers

  • 1,042