SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Docker:
Multi-arch All
The Things
Phil Estes
IBM Cloud @estesp
Michael Friis
Docker, Inc. @friism
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
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/
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
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!
Container Images for
Different Platforms
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
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
Image
Manifests
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v1+json",
"size": 2094,
"digest": "sha256:7820f9a86d4ad15a2c4f0c0e5479298df2aa7c2f6871288e2ef8546f3e7b6783",
"platform": {
"architecture": "ppc64le",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v1+json",
"size": 1922,
"digest": "sha256:ae1b0e06e8ade3a11267564a26e750585ba2259c0ecab59ab165ad1af41d1bdd",
"platform": {
"architecture": "amd64",
"os": "linux",
"features": [
"sse"
]
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v1+json",
"size": 2084,
"digest": "sha256:e4c0df75810b953d6717b8f8f28298d73870e8aa2a0d5e77b8391f16fdfbbbe2",
"platform": {
"architecture": "s390x",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v1+json",
"size": 2084,
"digest": "sha256:07ebe243465ef4a667b78154ae6c3ea46fdb1582936aac3ac899ea311a701b40",
"platform": {
"architecture": "arm",
"os": "linux",
"variant": "armv7"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v1+json",
"size": 2090,
"digest": "sha256:fb2fc0707b86dafa9959fe3d29e66af8787aee4d9a23581714be65db4265ad8a",
"platform": {
"architecture": "arm64",
"os": "linux",
"variant": "armv8"
}
Index (Manifest List)
linux amd64
linux ppc64le
windows amd64
Manifests:
Manifest
linux arm64
Layers:
Config:
L0
L1
Ln
Root Filesystem
/usr
/bin
/dev
/etc
/home
/lib
C
OCI Runtime Spec
process
args
env
cwd
…
root
mounts
Status of multi-arch images
Official Docker images
Microsoft .NET Core
LinuxKit
Lots of ARM projects
DEMO: Build multi-arch images
Dockerfile maintenance
Same OS = probably same (or very
similar) Dockerfile
Different OS = probably different
Dockerfiles
FROM microsoft/nanoserver:10.0.14393.1770
RUN Invoke-WebRequest $Env:DOWNLOAD_URL -OutFile dotnet.zip;
Expand-Archive dotnet.zip -DestinationPath
$Env:ProgramFilesdotnet;
Remove-Item -Force dotnet.zip
RUN setx /M PATH $($Env:PATH + ';' + $Env:ProgramFiles + 'dotnet')
FROM microsoft/dotnet:2.0-runtime-deps-jessie
RUN apt-get update 
&& apt-get install -y --no-install-recommends 
curl 
&& rm -rf /var/lib/apt/lists/*
RUN curl -SL $DOWNLOAD_URL --output dotnet.tar.gz 
&& echo "$DOWNLOAD_SHA dotnet.tar.gz" | sha512sum -c - 
&& mkdir -p /usr/share/dotnet 
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet 
&& rm dotnet.tar.gz 
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
Multiplatform CI Setup
git push
Container
Registry
Run Unit Tests
Build App
docker image build
Credit: Stefan Scherer
docker image push
docker manifest push
docker image push
Multi-architecture
Orchestration
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
Multi-arch: Swarm support
> Placement Engine
● Reads manifest list’s platform
entries
● Matches engine nodes with
platforms supported
> Docker Compose
● Can specify manual
constraints in YAML
"Placement": {
"Constraints": [
"node.platform.arch == s390x"
],
"Platforms": [
{
"Architecture": "amd64",
"OS": "linux"
},
{
"Architecture": "arm",
"OS": "linux"
},
{
"Architecture": "arm64",
"OS": "linux"
},
{
"Architecture": "ppc64le",
"OS": "linux"
},
docker service inspect
DEMO: Orchestration
Docker
Enterprise
Edition
Conclusion
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
Thanks!
Phil Estes
IBM Cloud @estesp
Michael Friis
Docker, Inc. @friism
Docker EE
Hosted Demo
Add picture
here
docker.com/trial
● Free 4 Hour Demo
● No Servers Required
● Full Docker EE
Cluster Access

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Docker to the Rescue of an Ops Team
Docker to the Rescue of an Ops TeamDocker to the Rescue of an Ops Team
Docker to the Rescue of an Ops Team
 
Docker for Mac and Windows: The Insider's Guide by Justin Cormack
Docker for Mac and Windows: The Insider's Guide by Justin CormackDocker for Mac and Windows: The Insider's Guide by Justin Cormack
Docker for Mac and Windows: The Insider's Guide by Justin Cormack
 
DCEU 18: Docker Containers in a Serverless World
DCEU 18: Docker Containers in a Serverless WorldDCEU 18: Docker Containers in a Serverless World
DCEU 18: Docker Containers in a Serverless World
 
Docker on Docker
Docker on DockerDocker on Docker
Docker on Docker
 
Troubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineersTroubleshooting tips from docker support engineers
Troubleshooting tips from docker support engineers
 
Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...Enabling Production Grade Containerized Applications through Policy Based Inf...
Enabling Production Grade Containerized Applications through Policy Based Inf...
 
DockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with DockerDockerCon EU 2015: Trading Bitcoin with Docker
DockerCon EU 2015: Trading Bitcoin with Docker
 
Building your production tech stack for docker container platform
Building your production tech stack for docker container platformBuilding your production tech stack for docker container platform
Building your production tech stack for docker container platform
 
DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy  DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy
 
DCEU 18: State of the Docker Engine
DCEU 18: State of the Docker EngineDCEU 18: State of the Docker Engine
DCEU 18: State of the Docker Engine
 
Advanced Access Control with Docker EE
Advanced Access Control with Docker EEAdvanced Access Control with Docker EE
Advanced Access Control with Docker EE
 
Automated hardware testing using docker for space
Automated hardware testing using docker for spaceAutomated hardware testing using docker for space
Automated hardware testing using docker for space
 
Node.js Rocks in Docker for Dev and Ops
Node.js Rocks in Docker for Dev and OpsNode.js Rocks in Docker for Dev and Ops
Node.js Rocks in Docker for Dev and Ops
 
Efficient Parallel Testing with Docker by Laura Frank
Efficient Parallel Testing with Docker by Laura FrankEfficient Parallel Testing with Docker by Laura Frank
Efficient Parallel Testing with Docker by Laura Frank
 
Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker Platform Internals: Taking runtimes and image creation to the next lev...Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker Platform Internals: Taking runtimes and image creation to the next lev...
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
DockerCon EU 2015: Shipping Manifests, Bill of Lading and Docker Metadata and...
DockerCon EU 2015: Shipping Manifests, Bill of Lading and Docker Metadata and...DockerCon EU 2015: Shipping Manifests, Bill of Lading and Docker Metadata and...
DockerCon EU 2015: Shipping Manifests, Bill of Lading and Docker Metadata and...
 
Online Meetup: What's new in docker 1.13.0
Online Meetup: What's new in docker 1.13.0 Online Meetup: What's new in docker 1.13.0
Online Meetup: What's new in docker 1.13.0
 
How to build your containerization strategy
How to build your containerization strategyHow to build your containerization strategy
How to build your containerization strategy
 
DockerCon EU 2015: Placing a container on a train at 200mph
DockerCon EU 2015: Placing a container on a train at 200mphDockerCon EU 2015: Placing a container on a train at 200mph
DockerCon EU 2015: Placing a container on a train at 200mph
 

Semelhante a Docker Multi-arch All The Things

Semelhante a Docker Multi-arch All The Things (20)

Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker
DockerDocker
Docker
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und WindowsBauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
Bauen und Verteilen von Multi-Arch Docker Images für Linux und Windows
 
Docker - Der Wal in der Kiste
Docker - Der Wal in der KisteDocker - Der Wal in der Kiste
Docker - Der Wal in der Kiste
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
Docker for developers z java
Docker for developers z javaDocker for developers z java
Docker for developers z java
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
Docker-v3.pdf
Docker-v3.pdfDocker-v3.pdf
Docker-v3.pdf
 
Docker for a .NET web developer
Docker for a .NET web developerDocker for a .NET web developer
Docker for a .NET web developer
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 

Mais de Docker, Inc.

Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 

Mais de Docker, Inc. (20)

Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience
 
How to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildHow to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker Build
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINX
 
How To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and ComposeHow To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and Compose
 
Hands-on Helm
Hands-on Helm Hands-on Helm
Hands-on Helm
 
Distributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at SalesforceDistributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at Salesforce
 
The First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker HubThe First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker Hub
 
Monitoring in a Microservices World
Monitoring in a Microservices WorldMonitoring in a Microservices World
Monitoring in a Microservices World
 
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
 
Predicting Space Weather with Docker
Predicting Space Weather with DockerPredicting Space Weather with Docker
Predicting Space Weather with Docker
 
Become a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio CodeBecome a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio Code
 
How to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container RegistryHow to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container Registry
 
Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog Scale
 
Labels, Labels, Labels
Labels, Labels, Labels Labels, Labels, Labels
Labels, Labels, Labels
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelUsing Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
 
Developing with Docker for the Arm Architecture
Developing with Docker for the Arm ArchitectureDeveloping with Docker for the Arm Architecture
Developing with Docker for the Arm Architecture
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Docker Multi-arch All The Things

  • 1. Docker: Multi-arch All The Things Phil Estes IBM Cloud @estesp Michael Friis Docker, Inc. @friism
  • 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
  • 9. Image Manifests { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.distribution.manifest.v1+json", "size": 2094, "digest": "sha256:7820f9a86d4ad15a2c4f0c0e5479298df2aa7c2f6871288e2ef8546f3e7b6783", "platform": { "architecture": "ppc64le", "os": "linux" } }, { "mediaType": "application/vnd.docker.distribution.manifest.v1+json", "size": 1922, "digest": "sha256:ae1b0e06e8ade3a11267564a26e750585ba2259c0ecab59ab165ad1af41d1bdd", "platform": { "architecture": "amd64", "os": "linux", "features": [ "sse" ] } }, { "mediaType": "application/vnd.docker.distribution.manifest.v1+json", "size": 2084, "digest": "sha256:e4c0df75810b953d6717b8f8f28298d73870e8aa2a0d5e77b8391f16fdfbbbe2", "platform": { "architecture": "s390x", "os": "linux" } }, { "mediaType": "application/vnd.docker.distribution.manifest.v1+json", "size": 2084, "digest": "sha256:07ebe243465ef4a667b78154ae6c3ea46fdb1582936aac3ac899ea311a701b40", "platform": { "architecture": "arm", "os": "linux", "variant": "armv7" } }, { "mediaType": "application/vnd.docker.distribution.manifest.v1+json", "size": 2090, "digest": "sha256:fb2fc0707b86dafa9959fe3d29e66af8787aee4d9a23581714be65db4265ad8a", "platform": { "architecture": "arm64", "os": "linux", "variant": "armv8" } Index (Manifest List) linux amd64 linux ppc64le windows amd64 Manifests: Manifest linux arm64 Layers: Config: L0 L1 Ln Root Filesystem /usr /bin /dev /etc /home /lib C OCI Runtime Spec process args env cwd … root mounts
  • 10. Status of multi-arch images Official Docker images Microsoft .NET Core LinuxKit Lots of ARM projects
  • 12. Dockerfile maintenance Same OS = probably same (or very similar) Dockerfile Different OS = probably different Dockerfiles
  • 13. FROM microsoft/nanoserver:10.0.14393.1770 RUN Invoke-WebRequest $Env:DOWNLOAD_URL -OutFile dotnet.zip; Expand-Archive dotnet.zip -DestinationPath $Env:ProgramFilesdotnet; Remove-Item -Force dotnet.zip RUN setx /M PATH $($Env:PATH + ';' + $Env:ProgramFiles + 'dotnet') FROM microsoft/dotnet:2.0-runtime-deps-jessie RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/* RUN curl -SL $DOWNLOAD_URL --output dotnet.tar.gz && echo "$DOWNLOAD_SHA dotnet.tar.gz" | sha512sum -c - && mkdir -p /usr/share/dotnet && tar -zxf dotnet.tar.gz -C /usr/share/dotnet && rm dotnet.tar.gz && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
  • 14. Multiplatform CI Setup git push Container Registry Run Unit Tests Build App docker image build Credit: Stefan Scherer docker image push docker manifest push docker image push
  • 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
  • 17. Multi-arch: Swarm support > Placement Engine ● Reads manifest list’s platform entries ● Matches engine nodes with platforms supported > Docker Compose ● Can specify manual constraints in YAML "Placement": { "Constraints": [ "node.platform.arch == s390x" ], "Platforms": [ { "Architecture": "amd64", "OS": "linux" }, { "Architecture": "arm", "OS": "linux" }, { "Architecture": "arm64", "OS": "linux" }, { "Architecture": "ppc64le", "OS": "linux" }, docker service inspect
  • 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
  • 21. Thanks! Phil Estes IBM Cloud @estesp Michael Friis Docker, Inc. @friism
  • 22. Docker EE Hosted Demo Add picture here docker.com/trial ● Free 4 Hour Demo ● No Servers Required ● Full Docker EE Cluster Access