SlideShare a Scribd company logo
Andy Clemenko
Labels, Labels, Labels…
Senior Solutions Engineer,
StackRox
@clemenko
clemenko
andy@stackrox.com
https://andyc.info/dc20
Labels, Labels, Labels
Why Labels?
• Security
• Simplicity
• Self Documenting
• Audit Trail
Label Schema
Key = Value
• Author
• Date
• Description
• Version
• and more…
Labels for CI?
• Source - Version Control
• Commit Number
• How to build
• Where it was built
• Build number
Labels for Security
• Build Server
• Version Control
• Commit Number
• How to was built
• Build number
Sample Labels
"org.opencontainers.image.authors": "clemenko@gmail.com",
"org.opencontainers.image.source": "https://github.com/clemenko/dc20_labels/tree/master/demo_flask",
"org.opencontainers.image.build": "docker build -t clemenko/flask_demo..." ,
"org.opencontainers.image.build_number": 22,
"org.opencontainers.image.build.server": http://jenkins.dockr.life/,
”org.opencontainers.image.commit": "98c997f",
"org.opencontainers.image.created": "05/07/20",
"org.opencontainers.image.description": "The repository contains a simple flask application.",
"org.opencontainers.image.healthz": "/healthz",
"org.opencontainers.image.version": "0.1",
"org.opencontainers.image.title": "clemenko/flask_demo",
"org.zdocker.compose": ... ,
"org.zdocker.k8s": ...
Create Labels
• Dockerfile
• Build Argument
• docker build - -label key=value
LABEL org.opencontainers.image.authors=$BUILD_SIGNATURE 
org.opencontainers.image.source="https://github.com/cleme
org.opencontainers.image.created=$BUILD_DATE 
org.opencontainers.image.build_number=$BUILD_NUMBER 
org.opencontainers.image.commit=$GIT_COMMIT 
org.opencontainers.image.build.server=$JENKINS_URL 
org.opencontainers.image.title="clemenko/flask_demo" 
org.opencontainers.image.description="The repository cont
flask --> redis." 
org.opencontainers.image.version=$BUILD_VERSION 
org.opencontainers.image.healthz="/healthz"
View Labels
• docker pull; docker inspect
• skopeo
$ skopeo inspect docker://docker.io/clemenko/flask_demo:prod | jq -r '
{
"org.opencontainers.image.authors": "clemenko@gmail.com",
"org.opencontainers.image.build.server": "http://jenkins.dockr.life/
"org.opencontainers.image.build_number": "2",
"org.opencontainers.image.commit": "cb03b31",
"org.opencontainers.image.created": "05/14/20",
"org.opencontainers.image.healthz": "/healthz",
"org.opencontainers.image.source": "https://github.com/clemenko/dc20
demo_flask",
"org.opencontainers.image.title": "clemenko/flask_demo",
"org.opencontainers.image.version": “0.1”…
Use Labels - k8s
$ skopeo inspect docker://docker.io/clemenko/flask_demo:prod | jq -r
'.Labels."org.zdocker.k8s"'| base64 -D | kubectl apply -f -
namespace/flask created
deployment.apps/flask created
deployment.apps/mongo created
deployment.apps/redis created
service/flask created
service/redis created
service/mongo created
ingress.networking.k8s.io/flask created
ingressroute.traefik.containo.us/flask-ingressroute created
DEMO
Demo Stack
● DigitalOcean - Ubuntu 19.10 VMS
● k3s
● Traefik - Ingress Controller
● Jenkins - CI
● StackRox - Image Scanning and policy
https://andyc.info/dc20
thanks!
andy@stackrox.com

More Related Content

PDF
How to Use Mirroring and Caching to Optimize your Container Registry
PDF
How To Build and Run Node Apps with Docker and Compose
PDF
Drone CI - Container native continuous Integration / Delivery
PDF
Become a Docker Power User With Microsoft Visual Studio Code
PPTX
Continuous Delivery with Jenkins & Kubernetes @ Sky
PPTX
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
PDF
Exploring Docker in CI/CD
DOCX
Build Your Own SaaS using Docker
How to Use Mirroring and Caching to Optimize your Container Registry
How To Build and Run Node Apps with Docker and Compose
Drone CI - Container native continuous Integration / Delivery
Become a Docker Power User With Microsoft Visual Studio Code
Continuous Delivery with Jenkins & Kubernetes @ Sky
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
Exploring Docker in CI/CD
Build Your Own SaaS using Docker

What's hot (20)

PPTX
Docker and Windows: The State of the Union
PDF
Activision's Skypilot: Delivering Amazing Game Experiences Through Containeri...
PDF
OpenStack Preso: DevOps on Hybrid Infrastructure
PPTX
Continuous Delivery With Selenium Grid And Docker
PDF
How to Improve Your Image Builds Using Advance Docker Build
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Improve your Java Environment with Docker
PPTX
Docker Security workshop slides
PDF
Continuous Delivery Pipeline with Docker and Jenkins
PDF
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
PDF
Dockers zero to hero
PDF
Jenkins & IaC
PDF
Democratizing Development - Scott Gress
PDF
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
PDF
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
PDF
GDGSCL - Docker a jeho provoz v Heroku a AWS
PPTX
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
PPTX
Zero to Continuous Delivery on Google Cloud
PDF
Online Meetup: Why should container system / platform builders care about con...
PDF
Container orchestration from theory to practice
Docker and Windows: The State of the Union
Activision's Skypilot: Delivering Amazing Game Experiences Through Containeri...
OpenStack Preso: DevOps on Hybrid Infrastructure
Continuous Delivery With Selenium Grid And Docker
How to Improve Your Image Builds Using Advance Docker Build
Build & Deploy Multi-Container Applications to AWS
Improve your Java Environment with Docker
Docker Security workshop slides
Continuous Delivery Pipeline with Docker and Jenkins
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Dockers zero to hero
Jenkins & IaC
Democratizing Development - Scott Gress
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
GDGSCL - Docker a jeho provoz v Heroku a AWS
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Zero to Continuous Delivery on Google Cloud
Online Meetup: Why should container system / platform builders care about con...
Container orchestration from theory to practice
Ad

Similar to Labels, Labels, Labels (20)

PDF
Codetainer: a Docker-based browser code 'sandbox'
PDF
Everything-as-code - A polyglot adventure
PDF
Everything-as-code. A polyglot adventure. #DevoxxPL
PDF
Chrome Devtools Protocol via Selenium/Appium (English)
PPT
Life of a Chromium Developer
PDF
The Internal Architecture of Chrome Developer Tools
PDF
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PDF
Chrome Devtools Protocol via Selenium/Appium (Japanese)
PPTX
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PDF
Sharpen your "Architectural Documentation" Saw
PPTX
CodeOne SF 2018 "Continuous Delivery with Containers: Lessons Learned"
PDF
Engage 2019: Introduction to Node-Red
PDF
OWASP SF - Reviewing Modern JavaScript Applications
PDF
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
PDF
BlackHat 2014 Briefings - Exploiting Fundamental Weaknesses in Botnet C&C Pan...
PDF
Software Supply Chains for DevOps @ InfoQ Live 2021
PPTX
Silicon Valley JUG - How to generate customized java 8 code from your database
PPTX
How to generate customized java 8 code from your database
PPTX
Marco Liberati - Write once, debug everywhere
PPTX
Web Components: The Future of Web Development is Here
Codetainer: a Docker-based browser code 'sandbox'
Everything-as-code - A polyglot adventure
Everything-as-code. A polyglot adventure. #DevoxxPL
Chrome Devtools Protocol via Selenium/Appium (English)
Life of a Chromium Developer
The Internal Architecture of Chrome Developer Tools
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
Chrome Devtools Protocol via Selenium/Appium (Japanese)
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
Sharpen your "Architectural Documentation" Saw
CodeOne SF 2018 "Continuous Delivery with Containers: Lessons Learned"
Engage 2019: Introduction to Node-Red
OWASP SF - Reviewing Modern JavaScript Applications
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
BlackHat 2014 Briefings - Exploiting Fundamental Weaknesses in Botnet C&C Pan...
Software Supply Chains for DevOps @ InfoQ Live 2021
Silicon Valley JUG - How to generate customized java 8 code from your database
How to generate customized java 8 code from your database
Marco Liberati - Write once, debug everywhere
Web Components: The Future of Web Development is Here
Ad

More from Docker, Inc. (20)

PDF
Containerize Your Game Server for the Best Multiplayer Experience
PDF
Build & Deploy Multi-Container Applications to AWS
PDF
Securing Your Containerized Applications with NGINX
PDF
Hands-on Helm
PDF
Distributed Deep Learning with Docker at Salesforce
PDF
The First 10M Pulls: Building The Official Curl Image for Docker Hub
PDF
Monitoring in a Microservices World
PDF
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
PDF
Predicting Space Weather with Docker
PDF
Monolithic to Microservices + Docker = SDLC on Steroids!
PDF
Kubernetes at Datadog Scale
PDF
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
PDF
Developing with Docker for the Arm Architecture
PDF
Sharing is Caring: How to Begin Speaking at Conferences
PDF
Virtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
PDF
DCSF 19 How Entergy is Mitigating Legacy Windows Operating System Vulnerabili...
PDF
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
PDF
DCSF 19 eBPF Superpowers
PDF
DCSF 19 Zero Trust Networks Come to Enterprise Kubernetes
PDF
DCSF 19 Node.js Rocks in Docker for Dev and Ops
Containerize Your Game Server for the Best Multiplayer Experience
Build & Deploy Multi-Container Applications to AWS
Securing Your Containerized Applications with NGINX
Hands-on Helm
Distributed Deep Learning with Docker at Salesforce
The First 10M Pulls: Building The Official Curl Image for Docker Hub
Monitoring in a Microservices World
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
Predicting Space Weather with Docker
Monolithic to Microservices + Docker = SDLC on Steroids!
Kubernetes at Datadog Scale
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Developing with Docker for the Arm Architecture
Sharing is Caring: How to Begin Speaking at Conferences
Virtual Meetup Docker + Arm: Building Multi-arch Apps with Buildx
DCSF 19 How Entergy is Mitigating Legacy Windows Operating System Vulnerabili...
DCSF 19 Developing Apps with Containers, Functions and Cloud Services
DCSF 19 eBPF Superpowers
DCSF 19 Zero Trust Networks Come to Enterprise Kubernetes
DCSF 19 Node.js Rocks in Docker for Dev and Ops

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
A Presentation on Artificial Intelligence
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Getting Started with Data Integration: FME Form 101
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Building Integrated photovoltaic BIPV_UPV.pdf
TLE Review Electricity (Electricity).pptx
A Presentation on Artificial Intelligence
A comparative analysis of optical character recognition models for extracting...
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Weekly Chronicles - August'25-Week II
Unlocking AI with Model Context Protocol (MCP)
A comparative study of natural language inference in Swahili using monolingua...
Group 1 Presentation -Planning and Decision Making .pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Getting Started with Data Integration: FME Form 101
Empathic Computing: Creating Shared Understanding
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
Machine learning based COVID-19 study performance prediction
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...

Labels, Labels, Labels

  • 1. Andy Clemenko Labels, Labels, Labels… Senior Solutions Engineer, StackRox @clemenko clemenko [email protected]
  • 4. Why Labels? • Security • Simplicity • Self Documenting • Audit Trail
  • 5. Label Schema Key = Value • Author • Date • Description • Version • and more…
  • 6. Labels for CI? • Source - Version Control • Commit Number • How to build • Where it was built • Build number
  • 7. Labels for Security • Build Server • Version Control • Commit Number • How to was built • Build number
  • 8. Sample Labels "org.opencontainers.image.authors": "[email protected]", "org.opencontainers.image.source": "https://github.com/clemenko/dc20_labels/tree/master/demo_flask", "org.opencontainers.image.build": "docker build -t clemenko/flask_demo..." , "org.opencontainers.image.build_number": 22, "org.opencontainers.image.build.server": http://jenkins.dockr.life/, ”org.opencontainers.image.commit": "98c997f", "org.opencontainers.image.created": "05/07/20", "org.opencontainers.image.description": "The repository contains a simple flask application.", "org.opencontainers.image.healthz": "/healthz", "org.opencontainers.image.version": "0.1", "org.opencontainers.image.title": "clemenko/flask_demo", "org.zdocker.compose": ... , "org.zdocker.k8s": ...
  • 9. Create Labels • Dockerfile • Build Argument • docker build - -label key=value LABEL org.opencontainers.image.authors=$BUILD_SIGNATURE org.opencontainers.image.source="https://github.com/cleme org.opencontainers.image.created=$BUILD_DATE org.opencontainers.image.build_number=$BUILD_NUMBER org.opencontainers.image.commit=$GIT_COMMIT org.opencontainers.image.build.server=$JENKINS_URL org.opencontainers.image.title="clemenko/flask_demo" org.opencontainers.image.description="The repository cont flask --> redis." org.opencontainers.image.version=$BUILD_VERSION org.opencontainers.image.healthz="/healthz"
  • 10. View Labels • docker pull; docker inspect • skopeo $ skopeo inspect docker://docker.io/clemenko/flask_demo:prod | jq -r ' { "org.opencontainers.image.authors": "[email protected]", "org.opencontainers.image.build.server": "http://jenkins.dockr.life/ "org.opencontainers.image.build_number": "2", "org.opencontainers.image.commit": "cb03b31", "org.opencontainers.image.created": "05/14/20", "org.opencontainers.image.healthz": "/healthz", "org.opencontainers.image.source": "https://github.com/clemenko/dc20 demo_flask", "org.opencontainers.image.title": "clemenko/flask_demo", "org.opencontainers.image.version": “0.1”…
  • 11. Use Labels - k8s $ skopeo inspect docker://docker.io/clemenko/flask_demo:prod | jq -r '.Labels."org.zdocker.k8s"'| base64 -D | kubectl apply -f - namespace/flask created deployment.apps/flask created deployment.apps/mongo created deployment.apps/redis created service/flask created service/redis created service/mongo created ingress.networking.k8s.io/flask created ingressroute.traefik.containo.us/flask-ingressroute created
  • 12. DEMO
  • 13. Demo Stack ● DigitalOcean - Ubuntu 19.10 VMS ● k3s ● Traefik - Ingress Controller ● Jenkins - CI ● StackRox - Image Scanning and policy