SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Shipping Manifest
ACR Build ACR
Geo-replicated East US
West Europe
/Demo
quotes-api
web
queue-worker
queue-
worker
web
quotes
-api
web
queue-
worker
quotes
-api
queue-
worker
web
quotes
-api
web
queue-
worker
quotes
-api
Docker Hub MCR ACR
Registries
docker build –t web:1
docker build –t quotes:1
docker build –t important:1
docker push web:1
docker push quotes:1
docker push important:1
HOST-A
web:1
digest: 91e
important:1
digest: 2re
web:1
digest: 91e
quotes:1
digest: u82
web:1
digest: 91e
important:1
digest: 2re
HOST-B
quotes:1
digest: u82
important:1
digest: 2re
quotes:1
digest: u82
important:1
digest: 2re
HOST-C
important:1
digest: 2re
quotes:1
digest: u82
important:1
digest: 2re
quotes:1
digest: u82
Image Cache
Image Cache
Image Cacheimportant:1
digest: 2re
quotes:1
digest: u82
web:1
digest: 91e
Image
web:1
quotes:1
important:1
Digests
91e
u82
2re
1
2
3
4
5 67important:1
digest: 2re
quotes:1
digest: u82
web:1
digest: 91e
quotes:1
digest: u82
important:1
digest: 2re
quotes:1
digest: u82
important:1
digest: 2re
8
Inner-Loop
Build/CI,
Integrate,
Test Production
environments
Run, Manage
Container Service
Service Fabric
App Services
Code
Run
Validate
Debug
CD, Deploy
Source Code
Control
(SCC)
Monitor and Diagnose
Container Instances
Azure Functions
IoT
Azure Batch
microsoft/aspnetcore-build
COPY .sln
COPY .csproj
nuget restore
copy source
dotnet build
publish
dotnet publish
microsoft/aspnetcore
final
COPY --from=publish /app
ENTRYPOINT ["dotnet", "HelloWorld.dll"]
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY HelloWorld.sln ./
COPY HelloWorld/HelloWorld.csproj HelloWorld/
RUN dotnet restore -nowarn:msb3202,nu1503
COPY . .
WORKDIR /src/HelloWorld
RUN dotnet build -c Release -o /app
FROM build AS publish
RUN dotnet publish -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "HelloWorld.dll"]
web:1
web:1web:1web:1web:1web:1
docker build –t web:1
docker push web:1
Integration Staging Prod-Marketing Prod-Finance Prod-Mfr
Web:1 Web:1 Web:1 Web:1Web:1
Contoso – Build Pool
Northwind – Build Pool
Build, Integrate, Test
Hosted
Build Agent Pool
Build, Integrate, Test
Hosted
Build Agent Pool
aka.ms/acr/build
Inner-Loop
Build/CI,
Integrate,
Test Production
environments
Run, Manage
Container Service
Service Fabric
App Services
Code
Run
Validate
Debug
CD, Deploy
Source Code
Control
(SCC)
Monitor and Diagnose
Container Instances
Azure Functions
IoT
Azure Batch
Container Service
Service Fabric
App Services
Container Instances
Azure Functions
IoT
Azure Batch
Source Code
Control
(SCC)
.NET
Inner-Loop
Build/CI,
Integrate,
Test
Code
Run
Validate
Debug
CD, Deploy
Azure Container
Registry
Azure Container
Registry
ACR
Build
Docker Hub
Host agents monitor, protect
and report running containers
Image Security Scanning
Secure by default
Upon release, set released
flag in ACR
(ACR-Auto-purge policies)
18 2
7
3
4
5
Microsoft Container
Registry
6
* Work in progress
Base Image
Index
Docker Hub MCR ACR
Registries
SCC Providers ACR Build Azure
Container Registry
Build Triggers
aka.ms/acr/build
FROM microsoft/aspnetcore-build:2.0 AS builder
ARG BuildConfiguration=Release
WORKDIR /src
COPY *.sln ./
COPY Web/Web.csproj Web/
RUN dotnet restore
COPY . .
WORKDIR /src/Web
RUN dotnet build -c $BuildConfiguration -o /app
FROM builder AS publish
ARG BuildConfiguration=Release
RUN dotnet publish -c $BuildConfiguration -o /app
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80
FROM base AS production
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "Web.dll"]
FROM microsoft/aspnetcore-build:2.0 AS builder
ARG BuildConfiguration=Release
WORKDIR /src
COPY *.sln ./
COPY Web/Web.csproj Web/
RUN dotnet restore
COPY . .
WORKDIR /src/Web
RUN dotnet build -c $BuildConfiguration -o /app
FROM builder AS test
WORKDIR /src/Web.test
RUN dotnet test
FROM builder AS publish
ARG BuildConfiguration=Release
RUN dotnet publish -c $BuildConfiguration -o /app
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80
FROM base AS production
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "Web.dll"]
FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80
FROM microsoft/aspnetcore-build:2.0 AS builder
ARG BuildConfiguration=Release
WORKDIR /src
COPY *.sln ./
COPY Web/Web.csproj Web/
RUN dotnet restore
COPY . .
WORKDIR /src/Web
RUN dotnet build -c $BuildConfiguration -o /app
FROM builder AS test
WORKDIR /src/Web.test
RUN dotnet test
FROM builder AS publish
ARG BuildConfiguration=Release
RUN dotnet publish -c $BuildConfiguration -o /app
FROM base AS production
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "Web.dll"]
test:1
Integration Env
web:1
web:1test:1
Functional Testing w/Helm & Kubernetes
- Dan Garfield
Codefresh.io
Chart.yaml
Values.yaml
templates
webapp.yaml
quotesapi.yaml
secrets.yaml
_helpers.tpl
charts
nginx-ingress-0.12.0.tgz
Web-Build
d5ab1fa
web:1web:1test:t
Dockerfile
FROM Commit Id
Build-
task
Context
Dependencies
ACRBase Images
fx:1 web:sha@lafx:1(a) deploy
Functional
Tests
deploy/test
Integration Env
web:1
web:1
Staging Env
fx:1fx:1
FROM jenga.azurecr.io/baseimages/fx:1
COPY . /output
EXPOSE 80
ENTRYPOINT ["entryPoint"]
az acr build-task create 
–n Web-Build 
–t web:${{.Build.ID}} 
–c github.com/demo42/web 
–-git-access-token $PAT 
–r jenga
If docker build succeeds (including any unit tests),
Save the context & base image dependencies
web:1
test:1
Id
1
Context
Dependencies
d5ab1fa
Integration Env
2
Web-Build
fx:1(a)
Dockerfile
FROM Commit Id
Build-
task
Context
Dependencies
ACRBase Images
fx:1 d5ab1fa web:sha@lafx:1(a) deploy
Functional
Tests
deploy/testweb:1fx:1
Id
1
Context
Dependencies
web:sha@yafx:1(b) deploydeploy/testfx:1(b) web:2web:2test:2web:2
web:2Base image updates restore
the previous context
fx ships an OS &/or FX Patch,
using the stable 1 tag
The build-task is monitoring
changes based on the last build
If Build & Unit Tests Succeed,
Update the base image dependencies
d5ab1fa
fx:1(b)
web:2
test:2
Staging Env
fx:2(d)
2
Web-Build
fx:1(a)
Dockerfile
FROM Commit Id
Build-
task
Context
Dependencie
s
ACRBase Images
fx:1 d5ab1fa web:sha@lafx:1(a) deploy
Functional
Tests
deploy/testweb:1fx:1
Id
1
Context
Dependencies
web:sha@yafx:1(b) deploydeploy/testfx:1(b) web:2web:2test:2web:2
d5ab1fa
fx:1(b)
fx:2(d)
Web-Build
ef26q5c
fx:2 ef26q5c web:sha@qe deploydeploy/test
FROM jenga.azurecr.io/baseimages/fx:2
COPY . /output
EXPOSE 80
ENTRYPOINT ["entryPoint"]
If docker build succeeds (including any unit tests),
Save the context & base image dependencies
3
fx:1(b)
Dependencies fx:2(d)
Integration Env
Staging Env
web:2web:3
web:3
web:3web:3test:4web:3
test:3
Container OS & Framework Patching
(1𝑝𝑟 = 1𝑏 + 1𝑝 + 1𝑡 + 1𝑑) ∗ 𝑙𝑖𝑓𝑒 𝑜𝑓 𝑑𝑒𝑣𝑒𝑙𝑜𝑝𝑚𝑒𝑛𝑡
1𝒑𝒂𝒕𝒄𝒉 = 𝒄𝒖𝒔𝒕 ∗ 𝒂𝒑𝒑𝒔 ∗ 1𝑏 + 1𝑝 + 1𝑡 + 1𝑑 ∗ 𝒍𝒊𝒇𝒆 𝒐𝒇 𝒕𝒉𝒆 𝒂𝒑𝒑
1 Pull
Request
= 1
Build
= 1
Push
= 1 Test = 1 Deploy= 1
Scan
Contoso (Returns)
= 1 Build
= 1 Build
= 1 Build
= 1 Push
= 1 Push
= 1 Push
= 1 Test
= 1 Test
= 1 Test
= 1 Deploy
= 1 Deploy
= 1 Deploy
= 1 Scan
= 1 Scan
= 1 Scan
Adventure Works
= 1 Build
= 1 Build
= 1 Build
= 1 Push
= 1 Push
= 1 Push
= 1 Test
= 1 Test
= 1 Test
= 1 Deploy
= 1 Deploy
= 1 Deploy
= 1 Scan
= 1 Scan
= 1 Scan
Fabrikam
Northwind
= 1 Build
= 1 Build
= 1 Build
= 1 Push
= 1 Push
= 1 Push
= 1 Test
= 1 Test
= 1 Test
= 1 Deploy
= 1 Deploy
= 1 Deploy
= 1 Scan
= 1 Scan
= 1 Scan
Smart Hotel 360 = 1 Build
= 1 Build
= 1 Build
= 1 Push
= 1 Push
= 1 Push
= 1 Test
= 1 Test
= 1 Test
= 1 Deploy
= 1 Deploy
= 1 Deploy
= 1 Scan
= 1 Scan
= 1 Scan
Contoso (*)
= 1 Build
= 1 Build
= 1 Build
= 1 Push
= 1 Push
= 1 Push
= 1 Test
= 1 Test
= 1 Test
= 1 Deploy
= 1 Deploy
= 1 Deploy
= 1 Scan
= 1 Scan
= 1 Scan
.NET
Why stable tagging can create instability
Digests
91e
u82
2re
3rp
1n4
docker build –t web:1
docker build –t quotes:1
docker build –t important:1
docker images
REPOSITORY TAG DIGEST
web 1 91e
quotes 1 u82
important 1 2re
docker push web:1
docker push quotes:1
docker push important:1
docker build –t quotes:1
docker build –t important:1
docker images
REPOSITORY TAG DIGEST
quotes 1 3rp
important 1 1n4
docker push quotes:1
docker push important:1
HOST-A
web:1
digest: 91e
important:1
digest: 2re
web:1
digest: 91e
quotes:1
digest: u82
web:1
digest: 91e
important:1
digest: 2re
HOST-B
quotes:1
digest: u82
important:1
digest: 2re
quotes:1
digest: u82
important:1
digest: 2re
HOST-C
important:1
digest: 1n4
quotes:1
digest: 3rp
important:1
digest: 1n4
quotes:1
digest: 3rp
Image Cache
Image Cache
Image Cacheimportant:1
digest: 2re
quotes:1
digest: u82
web:1
digest: 91e
Image
web:1
quotes:1
important:1
Digests
91e
u82
2re
quotes & important
are in inconsistent
states
quotes:1
digest: 3rp
important:1
digest: 1n4
1
2
3
4
5quotes:1
digest: u82
important:1
digest: 2re
quotes:1
digest: u82
important:1
digest: 2re
important:1
digest: 1n4
quotes:1
digest: 3rp
web:1
digest: 91e
6
7
89
Tag
Digest
Tag
Digest
:1.2
:1
:1.0
91efj6 u82lq 2re7f 1n4ef3rpn1
:1.1
5wd1k
:2.1:2.0
:2
:3.0
:3
:latest
:1
:1.0
91efj6 u82lq e8s1f 2re7f1n4ef
:1.1
3rpn1
:1.2
:2
:latest
28efq
:2.0
Tag
Digest
:12204
91efj6 u82lq e8s1f 2re7f1n4ef
:12328
3rpn1
:35091
28efq
:4201:12401 :33810 :50201
Base Images
FROM …
Deployed Images
docker run …
Docker Tagging: Best practices for tagging and versioning docker images
aka.ms/kubernetes
aka.ms/acr/brigade
aka.ms/helm
aka.ms/acr/build
aka.ms/acr/geo-replication
aka.ms/acr/presentations
github.com/demo42
blogs.msdn.microsoft.com/SteveLasker
SteveLas@Microsoft.com
BRK2115
Building, Running, Patching Docker
Containers – The Paradigm Shift
Building, Running, Patching Docker Containers – The Paradigm Shift
Building, Running, Patching Docker Containers – The Paradigm Shift

Weitere ähnliche Inhalte

Mehr von Microsoft Tech Community

Multiplayer Server Scaling with Azure Container Instances
Multiplayer Server Scaling with Azure Container InstancesMultiplayer Server Scaling with Azure Container Instances
Multiplayer Server Scaling with Azure Container InstancesMicrosoft Tech Community
 
Media Streaming Apps with Azure and Xamarin
Media Streaming Apps with Azure and XamarinMedia Streaming Apps with Azure and Xamarin
Media Streaming Apps with Azure and XamarinMicrosoft Tech Community
 
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexity
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexityReal-World Solutions with PowerApps: Tips & tricks to manage your app complexity
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexityMicrosoft Tech Community
 
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsight
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsightIngestion in data pipelines with Managed Kafka Clusters in Azure HDInsight
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsightMicrosoft Tech Community
 
Getting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AIGetting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AIMicrosoft Tech Community
 
Mobile Workforce Location Tracking with Bing Maps
Mobile Workforce Location Tracking with Bing MapsMobile Workforce Location Tracking with Bing Maps
Mobile Workforce Location Tracking with Bing MapsMicrosoft Tech Community
 
Cognitive Services Labs in action Anomaly detection
Cognitive Services Labs in action Anomaly detectionCognitive Services Labs in action Anomaly detection
Cognitive Services Labs in action Anomaly detectionMicrosoft Tech Community
 
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1Microsoft Tech Community
 
Building document processes using Adobe + Microsoft
Building document processes using Adobe + MicrosoftBuilding document processes using Adobe + Microsoft
Building document processes using Adobe + MicrosoftMicrosoft Tech Community
 
Work with files everywhere: Store files, extend user experiences, and build b...
Work with files everywhere: Store files, extend user experiences, and build b...Work with files everywhere: Store files, extend user experiences, and build b...
Work with files everywhere: Store files, extend user experiences, and build b...Microsoft Tech Community
 
Interactive emails in Outlook with Adaptive Cards
Interactive emails in Outlook with Adaptive CardsInteractive emails in Outlook with Adaptive Cards
Interactive emails in Outlook with Adaptive CardsMicrosoft Tech Community
 
Real-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShell
Real-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShellReal-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShell
Real-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShellMicrosoft Tech Community
 
Build five-star apps with App Center crash reports
Build five-star apps with App Center crash reportsBuild five-star apps with App Center crash reports
Build five-star apps with App Center crash reportsMicrosoft Tech Community
 
Extending DevOps with serverless Logic Apps
Extending DevOps with serverless Logic AppsExtending DevOps with serverless Logic Apps
Extending DevOps with serverless Logic AppsMicrosoft Tech Community
 

Mehr von Microsoft Tech Community (20)

Multiplayer Server Scaling with Azure Container Instances
Multiplayer Server Scaling with Azure Container InstancesMultiplayer Server Scaling with Azure Container Instances
Multiplayer Server Scaling with Azure Container Instances
 
Explore Azure Cosmos DB
Explore Azure Cosmos DBExplore Azure Cosmos DB
Explore Azure Cosmos DB
 
Media Streaming Apps with Azure and Xamarin
Media Streaming Apps with Azure and XamarinMedia Streaming Apps with Azure and Xamarin
Media Streaming Apps with Azure and Xamarin
 
DevOps for Data Science
DevOps for Data ScienceDevOps for Data Science
DevOps for Data Science
 
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexity
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexityReal-World Solutions with PowerApps: Tips & tricks to manage your app complexity
Real-World Solutions with PowerApps: Tips & tricks to manage your app complexity
 
Azure Functions and Microsoft Graph
Azure Functions and Microsoft GraphAzure Functions and Microsoft Graph
Azure Functions and Microsoft Graph
 
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsight
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsightIngestion in data pipelines with Managed Kafka Clusters in Azure HDInsight
Ingestion in data pipelines with Managed Kafka Clusters in Azure HDInsight
 
Getting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AIGetting Started with Visual Studio Tools for AI
Getting Started with Visual Studio Tools for AI
 
Using AML Python SDK
Using AML Python SDKUsing AML Python SDK
Using AML Python SDK
 
Mobile Workforce Location Tracking with Bing Maps
Mobile Workforce Location Tracking with Bing MapsMobile Workforce Location Tracking with Bing Maps
Mobile Workforce Location Tracking with Bing Maps
 
Cognitive Services Labs in action Anomaly detection
Cognitive Services Labs in action Anomaly detectionCognitive Services Labs in action Anomaly detection
Cognitive Services Labs in action Anomaly detection
 
Speech Devices SDK
Speech Devices SDKSpeech Devices SDK
Speech Devices SDK
 
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1
LinkedIn Learning presents: Securing web applications in ASP.NET Core 2.1
 
Building document processes using Adobe + Microsoft
Building document processes using Adobe + MicrosoftBuilding document processes using Adobe + Microsoft
Building document processes using Adobe + Microsoft
 
Work with files everywhere: Store files, extend user experiences, and build b...
Work with files everywhere: Store files, extend user experiences, and build b...Work with files everywhere: Store files, extend user experiences, and build b...
Work with files everywhere: Store files, extend user experiences, and build b...
 
Office Add-in Design Toolkit
Office Add-in Design ToolkitOffice Add-in Design Toolkit
Office Add-in Design Toolkit
 
Interactive emails in Outlook with Adaptive Cards
Interactive emails in Outlook with Adaptive CardsInteractive emails in Outlook with Adaptive Cards
Interactive emails in Outlook with Adaptive Cards
 
Real-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShell
Real-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShellReal-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShell
Real-World Solutions with PowerApps: ALM via Microsoft Flow & PowerShell
 
Build five-star apps with App Center crash reports
Build five-star apps with App Center crash reportsBuild five-star apps with App Center crash reports
Build five-star apps with App Center crash reports
 
Extending DevOps with serverless Logic Apps
Extending DevOps with serverless Logic AppsExtending DevOps with serverless Logic Apps
Extending DevOps with serverless Logic Apps
 

Kürzlich hochgeladen

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
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...DianaGray10
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
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 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
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, Adobeapidays
 

Kürzlich hochgeladen (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
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...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 

Building, Running, Patching Docker Containers – The Paradigm Shift

  • 1.
  • 2.
  • 4. ACR Build ACR Geo-replicated East US West Europe /Demo quotes-api web queue-worker queue- worker web quotes -api web queue- worker quotes -api queue- worker web quotes -api web queue- worker quotes -api Docker Hub MCR ACR Registries
  • 5. docker build –t web:1 docker build –t quotes:1 docker build –t important:1 docker push web:1 docker push quotes:1 docker push important:1 HOST-A web:1 digest: 91e important:1 digest: 2re web:1 digest: 91e quotes:1 digest: u82 web:1 digest: 91e important:1 digest: 2re HOST-B quotes:1 digest: u82 important:1 digest: 2re quotes:1 digest: u82 important:1 digest: 2re HOST-C important:1 digest: 2re quotes:1 digest: u82 important:1 digest: 2re quotes:1 digest: u82 Image Cache Image Cache Image Cacheimportant:1 digest: 2re quotes:1 digest: u82 web:1 digest: 91e Image web:1 quotes:1 important:1 Digests 91e u82 2re 1 2 3 4 5 67important:1 digest: 2re quotes:1 digest: u82 web:1 digest: 91e quotes:1 digest: u82 important:1 digest: 2re quotes:1 digest: u82 important:1 digest: 2re 8
  • 6. Inner-Loop Build/CI, Integrate, Test Production environments Run, Manage Container Service Service Fabric App Services Code Run Validate Debug CD, Deploy Source Code Control (SCC) Monitor and Diagnose Container Instances Azure Functions IoT Azure Batch
  • 7.
  • 8.
  • 9. microsoft/aspnetcore-build COPY .sln COPY .csproj nuget restore copy source dotnet build publish dotnet publish microsoft/aspnetcore final COPY --from=publish /app ENTRYPOINT ["dotnet", "HelloWorld.dll"] FROM microsoft/aspnetcore:2.0 AS base WORKDIR /app FROM microsoft/aspnetcore-build:2.0 AS build WORKDIR /src COPY HelloWorld.sln ./ COPY HelloWorld/HelloWorld.csproj HelloWorld/ RUN dotnet restore -nowarn:msb3202,nu1503 COPY . . WORKDIR /src/HelloWorld RUN dotnet build -c Release -o /app FROM build AS publish RUN dotnet publish -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "HelloWorld.dll"]
  • 10.
  • 11. web:1 web:1web:1web:1web:1web:1 docker build –t web:1 docker push web:1 Integration Staging Prod-Marketing Prod-Finance Prod-Mfr Web:1 Web:1 Web:1 Web:1Web:1
  • 12.
  • 13.
  • 14. Contoso – Build Pool Northwind – Build Pool Build, Integrate, Test Hosted Build Agent Pool
  • 17. Inner-Loop Build/CI, Integrate, Test Production environments Run, Manage Container Service Service Fabric App Services Code Run Validate Debug CD, Deploy Source Code Control (SCC) Monitor and Diagnose Container Instances Azure Functions IoT Azure Batch
  • 18. Container Service Service Fabric App Services Container Instances Azure Functions IoT Azure Batch Source Code Control (SCC) .NET Inner-Loop Build/CI, Integrate, Test Code Run Validate Debug CD, Deploy Azure Container Registry Azure Container Registry ACR Build Docker Hub Host agents monitor, protect and report running containers Image Security Scanning Secure by default Upon release, set released flag in ACR (ACR-Auto-purge policies) 18 2 7 3 4 5 Microsoft Container Registry 6 * Work in progress Base Image Index
  • 19. Docker Hub MCR ACR Registries SCC Providers ACR Build Azure Container Registry Build Triggers aka.ms/acr/build
  • 20.
  • 21.
  • 22. FROM microsoft/aspnetcore-build:2.0 AS builder ARG BuildConfiguration=Release WORKDIR /src COPY *.sln ./ COPY Web/Web.csproj Web/ RUN dotnet restore COPY . . WORKDIR /src/Web RUN dotnet build -c $BuildConfiguration -o /app FROM builder AS publish ARG BuildConfiguration=Release RUN dotnet publish -c $BuildConfiguration -o /app FROM microsoft/aspnetcore:2.0 AS base WORKDIR /app EXPOSE 80 FROM base AS production WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "Web.dll"] FROM microsoft/aspnetcore-build:2.0 AS builder ARG BuildConfiguration=Release WORKDIR /src COPY *.sln ./ COPY Web/Web.csproj Web/ RUN dotnet restore COPY . . WORKDIR /src/Web RUN dotnet build -c $BuildConfiguration -o /app FROM builder AS test WORKDIR /src/Web.test RUN dotnet test FROM builder AS publish ARG BuildConfiguration=Release RUN dotnet publish -c $BuildConfiguration -o /app FROM microsoft/aspnetcore:2.0 AS base WORKDIR /app EXPOSE 80 FROM base AS production WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "Web.dll"]
  • 23.
  • 24. FROM microsoft/aspnetcore:2.0 AS base WORKDIR /app EXPOSE 80 FROM microsoft/aspnetcore-build:2.0 AS builder ARG BuildConfiguration=Release WORKDIR /src COPY *.sln ./ COPY Web/Web.csproj Web/ RUN dotnet restore COPY . . WORKDIR /src/Web RUN dotnet build -c $BuildConfiguration -o /app FROM builder AS test WORKDIR /src/Web.test RUN dotnet test FROM builder AS publish ARG BuildConfiguration=Release RUN dotnet publish -c $BuildConfiguration -o /app FROM base AS production WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "Web.dll"] test:1 Integration Env web:1 web:1test:1 Functional Testing w/Helm & Kubernetes - Dan Garfield Codefresh.io
  • 25.
  • 26.
  • 28.
  • 29.
  • 30. Web-Build d5ab1fa web:1web:1test:t Dockerfile FROM Commit Id Build- task Context Dependencies ACRBase Images fx:1 web:sha@lafx:1(a) deploy Functional Tests deploy/test Integration Env web:1 web:1 Staging Env fx:1fx:1 FROM jenga.azurecr.io/baseimages/fx:1 COPY . /output EXPOSE 80 ENTRYPOINT ["entryPoint"] az acr build-task create –n Web-Build –t web:${{.Build.ID}} –c github.com/demo42/web –-git-access-token $PAT –r jenga If docker build succeeds (including any unit tests), Save the context & base image dependencies web:1 test:1 Id 1 Context Dependencies d5ab1fa
  • 31. Integration Env 2 Web-Build fx:1(a) Dockerfile FROM Commit Id Build- task Context Dependencies ACRBase Images fx:1 d5ab1fa web:sha@lafx:1(a) deploy Functional Tests deploy/testweb:1fx:1 Id 1 Context Dependencies web:sha@yafx:1(b) deploydeploy/testfx:1(b) web:2web:2test:2web:2 web:2Base image updates restore the previous context fx ships an OS &/or FX Patch, using the stable 1 tag The build-task is monitoring changes based on the last build If Build & Unit Tests Succeed, Update the base image dependencies d5ab1fa fx:1(b) web:2 test:2 Staging Env
  • 32. fx:2(d) 2 Web-Build fx:1(a) Dockerfile FROM Commit Id Build- task Context Dependencie s ACRBase Images fx:1 d5ab1fa web:sha@lafx:1(a) deploy Functional Tests deploy/testweb:1fx:1 Id 1 Context Dependencies web:sha@yafx:1(b) deploydeploy/testfx:1(b) web:2web:2test:2web:2 d5ab1fa fx:1(b) fx:2(d) Web-Build ef26q5c fx:2 ef26q5c web:sha@qe deploydeploy/test FROM jenga.azurecr.io/baseimages/fx:2 COPY . /output EXPOSE 80 ENTRYPOINT ["entryPoint"] If docker build succeeds (including any unit tests), Save the context & base image dependencies 3 fx:1(b) Dependencies fx:2(d) Integration Env Staging Env web:2web:3 web:3 web:3web:3test:4web:3 test:3 Container OS & Framework Patching
  • 33.
  • 34. (1𝑝𝑟 = 1𝑏 + 1𝑝 + 1𝑡 + 1𝑑) ∗ 𝑙𝑖𝑓𝑒 𝑜𝑓 𝑑𝑒𝑣𝑒𝑙𝑜𝑝𝑚𝑒𝑛𝑡 1𝒑𝒂𝒕𝒄𝒉 = 𝒄𝒖𝒔𝒕 ∗ 𝒂𝒑𝒑𝒔 ∗ 1𝑏 + 1𝑝 + 1𝑡 + 1𝑑 ∗ 𝒍𝒊𝒇𝒆 𝒐𝒇 𝒕𝒉𝒆 𝒂𝒑𝒑 1 Pull Request = 1 Build = 1 Push = 1 Test = 1 Deploy= 1 Scan Contoso (Returns) = 1 Build = 1 Build = 1 Build = 1 Push = 1 Push = 1 Push = 1 Test = 1 Test = 1 Test = 1 Deploy = 1 Deploy = 1 Deploy = 1 Scan = 1 Scan = 1 Scan Adventure Works = 1 Build = 1 Build = 1 Build = 1 Push = 1 Push = 1 Push = 1 Test = 1 Test = 1 Test = 1 Deploy = 1 Deploy = 1 Deploy = 1 Scan = 1 Scan = 1 Scan Fabrikam Northwind = 1 Build = 1 Build = 1 Build = 1 Push = 1 Push = 1 Push = 1 Test = 1 Test = 1 Test = 1 Deploy = 1 Deploy = 1 Deploy = 1 Scan = 1 Scan = 1 Scan Smart Hotel 360 = 1 Build = 1 Build = 1 Build = 1 Push = 1 Push = 1 Push = 1 Test = 1 Test = 1 Test = 1 Deploy = 1 Deploy = 1 Deploy = 1 Scan = 1 Scan = 1 Scan Contoso (*) = 1 Build = 1 Build = 1 Build = 1 Push = 1 Push = 1 Push = 1 Test = 1 Test = 1 Test = 1 Deploy = 1 Deploy = 1 Deploy = 1 Scan = 1 Scan = 1 Scan .NET
  • 35. Why stable tagging can create instability
  • 36. Digests 91e u82 2re 3rp 1n4 docker build –t web:1 docker build –t quotes:1 docker build –t important:1 docker images REPOSITORY TAG DIGEST web 1 91e quotes 1 u82 important 1 2re docker push web:1 docker push quotes:1 docker push important:1 docker build –t quotes:1 docker build –t important:1 docker images REPOSITORY TAG DIGEST quotes 1 3rp important 1 1n4 docker push quotes:1 docker push important:1 HOST-A web:1 digest: 91e important:1 digest: 2re web:1 digest: 91e quotes:1 digest: u82 web:1 digest: 91e important:1 digest: 2re HOST-B quotes:1 digest: u82 important:1 digest: 2re quotes:1 digest: u82 important:1 digest: 2re HOST-C important:1 digest: 1n4 quotes:1 digest: 3rp important:1 digest: 1n4 quotes:1 digest: 3rp Image Cache Image Cache Image Cacheimportant:1 digest: 2re quotes:1 digest: u82 web:1 digest: 91e Image web:1 quotes:1 important:1 Digests 91e u82 2re quotes & important are in inconsistent states quotes:1 digest: 3rp important:1 digest: 1n4 1 2 3 4 5quotes:1 digest: u82 important:1 digest: 2re quotes:1 digest: u82 important:1 digest: 2re important:1 digest: 1n4 quotes:1 digest: 3rp web:1 digest: 91e 6 7 89
  • 37.
  • 38. Tag Digest Tag Digest :1.2 :1 :1.0 91efj6 u82lq 2re7f 1n4ef3rpn1 :1.1 5wd1k :2.1:2.0 :2 :3.0 :3 :latest :1 :1.0 91efj6 u82lq e8s1f 2re7f1n4ef :1.1 3rpn1 :1.2 :2 :latest 28efq :2.0 Tag Digest :12204 91efj6 u82lq e8s1f 2re7f1n4ef :12328 3rpn1 :35091 28efq :4201:12401 :33810 :50201 Base Images FROM … Deployed Images docker run …
  • 39. Docker Tagging: Best practices for tagging and versioning docker images
  • 41. BRK2115 Building, Running, Patching Docker Containers – The Paradigm Shift

Hinweis der Redaktion

  1. Microsoft 2016
  2. Microsoft 2016