Make for docker

Preview:

Citation preview

French Engineers Alumni Network

Make For DockerSingapore #11 - 06/12/2016 @

By Mathieu François

System container

Vs

Application container

Docker 101: The Ubuntu of Containers

Docker 101: Container vs VM

Swarm Architecture

Swarm “Cabinet”

Many Host OS serversScaled on-demand

1 or few Host OS ServersFixed number

Few Docker images Many Docker images

Many containers running per image Scaled on-demand

1 or few containers running per image Fixed number

Massively Scalable Application Optimization of limited resourcesIsolation of team activities and servicesPoor man’s scalability

Containers are “Cattle” Containers are “Pets”

Swarm vs “Cabinet” Architecture

Cabinet Stage 1: Staging vs Live

Cabinet Stage 2: Data & Backup

Cabinet Stage 3: Infrastructure Services

Cabinet Stage 4: Container Templates

“Cabinet” Troubleshooting

● runit http://smarden.org/runit/● “The DJB way”

http://thedjbway.b0llix.net/● DJB site http://cr.yp.to/

The “Unix Way”

vs

Monolithic-Fat-And-Ugly-Enterprise approach (systemd)

Lightweight Multi-Process Containers

Problem: Dockerfiles & Copy/Paste “Inflation”

Imagine a Docker World Where we could...

● Define small pieces of configuration or functionality, then mix them together into production docker images

● "Inherit" from multiple image builds ● Easily manage images that pull files from multiple directories on

our filesystem ● Rebuild an entire stack of images as needed with a single

command

Sounds Like Good Old Fashioned Makefiles

DockerMake

● “Build and manage stacks of docker images - a dependency graph for Dockerfiles”

● https://github.com/avirshup/DockerMake● Without the ugly old-school syntax of GNU Makefiles

DockerMake - DockerMake.yaml

gliderlabs/alpine:3.4

alpine-common:2.0

alpine-runit:2.0

alpine-nginx:2.0

alpine-nginx-vhost:2.0

alpine-common-clean:2.0

nginx-vhost:2.0

requires

requires

requires

requires

requires

FROM

image

official repository

module

DockerMake - No Arguments

Displays all the available targets

DockerMake - Build 1 Target

DockerMake - Images

Intermediate build steps also generate images in order to optimize the Docker layers

They didn’t use DockerMake!

Recommended