dockerdublin meetup - news about docker 1.13

15
6 October 2016 © 2016 CurrencyFair Ltd News about Docker 1.13 Gianluca Arbezzano Software Engineer at CurrencyFair

Upload: gianluca-arbezzano

Post on 12-Feb-2017

174 views

Category:

Technology


5 download

TRANSCRIPT

6 October 2016© 2016 CurrencyFair Ltd

News about Docker 1.13 Gianluca ArbezzanoSoftware Engineer at CurrencyFair

6 October 2016© 2016 CurrencyFair Ltd

Docker 1.13 makes production environment

good.

6 October 2016© 2016 CurrencyFair Ltd

CLI redesign

Docker CLI is always a privileged client for the daemon. Thousand

of users learn how to run contains with this tools:

docker run -it alpine sleep 10

6 October 2016© 2016 CurrencyFair Ltd

CLI redesign

Advanced users or scripts to build complex solution:

find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <(

docker ps -aq | xargs docker inspect | jq -r '.[]|.Mounts|.[]|.Name|select(.)'

)

6 October 2016© 2016 CurrencyFair Ltd

But was time for a little re-design

6 October 2016© 2016 CurrencyFair Ltd

top level command

● checkpoint Manage checkpoints

● container Manage containers

● image Manage images

● network Manage networks

● node Manage Swarm nodes

● plugin Manage plugins

● secret Manage Docker secrets

● service Manage services

● stack Manage Docker stacks

● swarm Manage Swarm

● system Manage Docker

● volume Manage volumes

100% compatible with the old commands: run, stop, start and so on

http://blog.arungupta.me/docker-1-13-management-commands/

6 October 2016© 2016 CurrencyFair Ltd

Keep your environment clean

docker system

docker system info == docker info

docker system event => to follow stream’s events from deamon

docker system prune => to clean your env from bad layers,

volumes and networks

6 October 2016© 2016 CurrencyFair Ltd

Plugins are out of

experimental

6 October 2016© 2016 CurrencyFair Ltd

Experimentalis just a flag now! Not a different build

6 October 2016© 2016 CurrencyFair Ltd

t-shirt time!

6 October 2016© 2016 CurrencyFair Ltd

Welcome compose v3version: ‘3’

services:

micro:

image: gianarb/micro:1.2.0

deploy:

mode: replicated

replicas: 2

resources:

limits:

cpus: '0.25'

memory: 512M

reservations:

cpus: '0.25'

memory: 256M

restart_policy:

condition: on-failure

delay: 5s

max_attempts: 3

window: 120s

Compatible with Swarm modedocker stack create \ -c ./docker-compose.yml frontend

6 October 2016© 2016 CurrencyFair Ltd

Secrets are available in Swarm mode

docker secret create well ./secret.json

docker service create --secret well alpine sleep 1000

Secrets are running in directory /run

6 October 2016© 2016 CurrencyFair Ltd

Squash layers

docker build --squash -t jenkins-sq .

6 October 2016© 2016 CurrencyFair Ltd

DemoTime!

6 October 2016© 2016 CurrencyFair Ltd

Questions?

● twitter.com/gianab● github.com/gianarb/micro● github.com/gianarb/docker-stack● scaledocker.com● gianarb.it/blog/docker-the-fundamentals