1. Docker in productionDocker in production
problems, fixes and beyondproblems, fixes and beyond
Miguel A. Guillen & Ioannis BetasMiguel A. Guillen & Ioannis Betas
6. 1.- Don't use links1.- Don't use links
Links are not cool:Links are not cool:
●
Remove containers with linksRemove containers with links
it's...it's...
●
Not multi-host support (yet)Not multi-host support (yet)
●
Difficult to maintain (micro-Difficult to maintain (micro-
services)services)
7. 1.- Don't use links1.- Don't use links
Service discovery:Service discovery:
●
We use consul, dns interface isWe use consul, dns interface is
coolcool
●
Etcd or zookeeperEtcd or zookeeper
●
Simplify your deploymentsSimplify your deployments
●
But we don't have isolationBut we don't have isolation
8. 2.- avoid port redirection2.- avoid port redirection
Take not always works:Take not always works:
●
Memory leak in docker (yes..)Memory leak in docker (yes..)
●
Some services they are not going toSome services they are not going to
work (scala)work (scala)
●
Some services need to announceSome services need to announce
their IPtheir IP
●
Use --net=host“ ”Use --net=host“ ”
9. 3.- driver storage3.- driver storage
By default is devicemapperBy default is devicemapper
●
Not use default loopback optionNot use default loopback option
●
Create a partition with a thinpoolCreate a partition with a thinpool
●
Check other drivers like btrfs orCheck other drivers like btrfs or
unionfsunionfs
●
Do not use aufsDo not use aufs
10. 4.- avoid big images4.- avoid big images
Big images are badBig images are bad
●
Slow deploymentsSlow deployments
●
Not really reusable imagesNot really reusable images
●
Try to use the same base imageTry to use the same base image
●
Automated deployments it's going toAutomated deployments it's going to
fill your disk partitionfill your disk partition
11. 5.- Do not use docker for databases5.- Do not use docker for databases
Or any kind of storage serviceOr any kind of storage service
●
Persistence in docker isPersistence in docker is
complicatedcomplicated
●
Data is saved in the copy on writeData is saved in the copy on write
fsfs
●
Use host for saving the data is anUse host for saving the data is an
optionoption
●
But not use persistence services inBut not use persistence services in
docker (yet)docker (yet)