The document discusses Docker's support for multiple CPU architectures and operating systems through multi-architecture container images and orchestration. It explains how Docker images are tied to a specific OS and CPU, requiring multi-arch images to run universally. It demonstrates building and distributing multi-arch images, and how Docker Swarm and Compose support placement and constraints for multi-arch orchestration. It concludes that maintaining multi-arch images takes effort but provides portability, and that Docker EE supports orchestrating Linux, Windows, IBM Z and Power systems through one interface.
2. Agenda
● Docker Engine across Multiple
CPU and OS Platforms
● Container Images for Multiple
Platforms and Architectures
● Multi-Architecture Orchestration
linux/amd64
linux/arm64
linux/arm
linux/s390x
linux/ppc64le
windows/amd64
3. Multi-arch in action!
$ docker run golang go version
Go version go1.9.1 <os/arch>
$
* https://blog.docker.com/2017/09/docker-official-images-now-multi-platform/
4. Docker Platform Expansion
2014 2015 2016 2017
2013-14 Docker on x86_64
April 2015: Docker client
on Windows
June 2015: Docker
engine on Raspberry
Pi (ARMv5), z13 (s390x
mainframe), and
Power Systems
June 2016: Docker engine
in Windows 10 Preview
April 2017: Docker EE
official support for IBM
z/LinuxONE and Power
Systems
Go runtime porting to s390x,
ppc64le, improvements to
ARM/other embedded CPUs
2014-2015
5. Why do we care?
> Docker runs across many operating
environments/CPU architectures
> Portability and ease of use are core
Docker tenets
Goal: Building and running applications on
Docker should works the same anywhere!
7. Containers != VMs
Containers:
● Do not virtualize hardware or kernel
○ Great for performance and density
○ But, stuck with host CPU/kernel
● Can’t “emulate” CPU arch capability**
○ Can’t run Windows containers on Linux host
○ or z/Linux containers on x86_64 Linux host
** caveat: qemu “binfmt” support on Linux
We must build multi-arch images
Docker Hub
nginx microsoft/iis
8. Manifest lists
Required: image type support
for per-platform images
● The Docker v2.2 image spec
met this requirement (Jan 2016)
● Included a new media type: “v2
manifest list”
A manifest list contains
platform segregated
references to single-platform
manifest entries
$ docker run mplatform/mquery golang
Image: golang
* Manifest List: Yes
* Supported platforms:
- amd64/linux
- arm/linux (variant: v7)
- arm64/linux (variant: v8)
- 386/linux
- ppc64le/linux
- s390x/linux
16. Multiplatform Orchestration
> Requires arch-aware
orchestrator
● Images can continue to be CPU and/or OS
specific (for example: Windows or Linux-only
software; software not ported to multi-CPU)
● Even if images are multi-platform you may
choose to run particular workloads on
certain hardware/OS platforms
Image registry
Windows
Linux
x86_64
Linux
s390x
20. Take-aways
Container images are specific to the OS and
CPU they’re built on
Maintain Docker images? Making them
multi-arch takes effort (but it’s worth it)
Docker EE supports Linux, Windows, IBM Z and
Power with one pane of glass