What's New in Docker 1.12 by Nishant Totla for Docker SF Meetup 08.03.16
1. What’s New in Docker 1.12
Docker Meetup
August 3, 2016
Nishant Totla
@nishanttotla
nishant@docker.com
2. Overview of new features
• Orchestration
• Swarm mode
• Docker services
• Secure by default
• Networking
• Live Restore
• Container Healthchecks
• Plugin Improvements
3. Swarm Mode
• Your Docker Engine is now cluster-aware
• The best way to orchestrate Docker is Docker
• Really easy to set up your cluster and manage deployments
18. Rolling Updates
$ docker service update
--image frontend_image:v2.0
--update-delay 10s
--update-parallelism 2
frontend
Engine Engine
Engine
Engine
Engine
mynet
19. Rolling Updates
$ docker service update
--image frontend_image:v2.0
--update-delay 10s
--update-parallelism 2
frontend
Engine Engine
Engine
Engine
Engine
mynet
20. Rolling Updates
$ docker service update
--image frontend_image:v2.0
--update-delay 10s
--update-parallelism 2
frontend
Engine Engine
Engine
Engine
Engine
mynet
21. Rolling Updates
$ docker service update
--image frontend_image:v2.0
--update-delay 10s
--update-parallelism 2
frontend
Engine Engine
Engine
Engine
Engine
mynet
22. Rolling Updates
$ docker service update
--image frontend_image:v2.0
--update-delay 10s
--update-parallelism 2
frontend
Engine Engine
Engine
Engine
Engine
mynet
23. Overview of new features
• Orchestration
• Swarm mode
• Docker services
• Secure by default
• Networking
• Live Restore
• Container Healthchecks
• Plugin Improvements
24. Secure by Default with end to end Encryption
• Cryptographic node
identity
• Automatic encryption
and mutual auth (TLS)
• Automatic certificate
rotation
• External CA integration
Manager
[TLS]
[CA]
Manager
[TLS]
[CA]
Manager
[TLS]
[CA]
Agent
[TLS]
Agent
[TLS]
Agent
[TLS]
25. Overview of new features
• Orchestration
• Swarm mode
• Docker services
• Secure by default
• Networking
• Live Restore
• Container Healthchecks
• Plugin Improvements
26. Routing Mesh
• Operator reserves a
swarm-wide ingress
port (8080) for
myapp
• Every node listens
on 8080
Manager
Agent 1 Agent 2 Agent 3
$ docker service create
--replicas 3
--name frontend
--network mynet
--publish 8080:80/tcp
frontend_image:latest
:8080 :8080 :8080
:8080
access
myapp.com:8080
27. Routing Mesh
• Container-aware
routing mesh can
transparently
reroute traffic to a
node that is
running the
container
• Built-in (layer 4)
load balancing
• DNS-based service
discovery
Manager
Agent 1 Agent 2 Agent 3
$ docker service create
--replicas 3
--name frontend
--network mynet
--publish 8080:80/tcp
frontend_image:latest
:8080 :8080 :8080
:8080
access
myapp.com:8080
28. Swarm Mode is Optional
• Docker 1.12 is fully backwards compatible
• You can continue to use your old deployments without Swarm Mode
• Swarm Mode is now the easiest way to try orchestration with Docker
29. Overview of new features
• Orchestration
• Swarm mode
• Docker services
• Secure by default
• Networking
• Live Restore
• Container Healthchecks
• Plugin Improvements
30. Live Restore
{
“live-restore”: true
}
• By default, terminating Docker daemon shuts down running containers
• Starting with 1.12, it is possible to configure the daemon so that containers
remain running when daemon becomes unavailable
• Useful for upgrades, planned outages, crashes
• Either update the default configuration file
• Or pass a flag when starting the daemon
$ sudo dockerd --live-restore
31. Container Healthchecks in Dockerfile
• Checks every 5 minutes that web server can return index page within 3
seconds
• Three consecutive failures puts container in an unhealthy state
• Works with services in Swarm Mode
HEALTHCHECK --interval=5m --timeout=3s
--retries=3
CMD curl –f http://localhost/ || exit 1
33. Plugin Permissions Model
$ docker plugin install tiborvass/no-remove
Plugin “tiborvass/no-remove:latest” requested the following
privileges:
- Networking: host
- Mounting host path: /data
Do you grant the above permissions? [y/N]
38. Overview of new features
• Strongly consistent – holds desired state
• Simple to operate
• Fast (in-memory reads, domain specific indexing, …)
• Secure
39. Overview of new features
• Eventually consistent – routing mesh, load balancing rules, …
• High volume, p2p network between workers
• Secure: symmetric encryption with key rotation in Raft