SlideShare a Scribd company logo
Build and run applications in a
Dockerless Kubernetes world
Jorge Morales
OpenShift Developer Advocate
Riga Dev Days 2018
Me (aka Jorge Morales)
● Spanish by nature and by language
● Work at Red Hat
● OpenShift Developer Advocate
● Mostly Java developer
● Obsessed with improving the developer experience
@jorgemoralespou
github.com/jorgemoralespou
http://jorgemoral.es
Build and run applications in a dockerless kubernetes world
Build and run applications in a dockerless kubernetes world
Kernel namespaces: sandboxing processes
from one another
Control Groups (cgroups): control process
resource allocations
Security: capabilities drop (seccomp),
Mandatory access control (SELinux,
Apparmor)
Linux Containers
@jorgemoralespou
VMS vs Containers
@jorgemoralespou
@jorgemoralespou
Build and run applications in a dockerless kubernetes world
@jorgemoralespou
@jorgemoralespou
With scale came complexity
Orchestration
@jorgemoralespou
OTHER ORCHESTRATORS
(Cloud Foundry Diego,
Nomad, Blox, etc.)
2 YEARS AGO
Fragmented landscape
TODAY
Kubernetes consolidation
OTHER
ORCHESTRATORS
CONTAINER ORCHESTRATION LANDSCAPE
@jorgemoralespou
Why kubernetes?
#1: Open source, backed by giants
#2: Vibrant and fast growing community
#3: Supported on all clouds
#4: Great partnerships
@jorgemoralespou
Started slow
June
2014
Docker 1.0
Dec
2014
Kubernetes 1.0: Supports
Docker containers
Rkt 0.1.0
July
2015
@jorgemoralespou
then more runtimes showed up
Rkt 1.0
Feb
2016
Kubernetes 1.3: Supports
Docker and Rkt containers
July
2016
June
2014
Docker 1.0
Dec
2014
Kubernetes 1.0: Supports
Docker containers
Rkt 0.1.0
July
2015
@jorgemoralespou
and code got messy
@jorgemoralespou
“Change is the essential
process of all of
existence.”
—SPOCK
Standardize containers
● Runtime spec (runc = Reference implementation)
● Image spec
● Distribution spec (proposal)
@jorgemoralespou
Use API/Interfaces to Container Runtimes
KUBELET
FRAKTI
OCI-RUNTIME
RUNC
DOCKERD RKT
CONTAINER RUNTIME INTERFACE (CRI)
DOCKERD RKT
KUBELET
@jorgemoralespou
Standardization became a fact
Rkt 1.0
Feb
2016
Kubernetes 1.3: Supports
Docker and Rkt containers
July
2016
June
2014
Docker 1.0
Dec
2014
Kubernetes 1.0: Supports
Docker containers
Rkt 0.1.0
July
2015
Dec
2016
Kubernetes 1.5: Container
Runtime Interface (CRI)
alpha
July
2017
Kubernetes 1.7: CRI
support GA
@jorgemoralespou
What is Container Runtime Interface (CRI)?
● A gRPC interface and a group of libraries
● Enables Kubernetes to use a wide variety of container runtimes
● Introduced in Kubernetes 1.5
● GA in Kubernetes 1.7
@jorgemoralespou
CRI Implementations
frakti
cri-containerd
dockershim
virtlet @jorgemoralespou
CRI-O
● Open source & Open governance
● Lean, Stable, Secure and BORING!
○ Tied to the CRI
○ No features that can mine stability
and performance
○ Shaped around Kubernetes
○ Only supported user is Kubernetes
○ Versioning and Support are tied to
Kubernetes
@jorgemoralespou
Man, this guy is so boring!
When is the live demo?
@jorgemoralespou
Demo script
SHOW DOCKER AND STOP IT
$ docker images
$ systemctl stop docker
$ docker images
RUN A CONTAINER WITH OC/KUBECTL
$ kubectl get pods
$ kubectl run --image=nginx --port=80 nginx
$ kubectl expose deployment nginx --port=80
$ kubectl get svc
$ curl http://<CLUSTER-IP>
$ oc expose svc/nginx-http
$ oc get route
$ kubectl get pods
$ kubectl logs -f <POD_NAME>
$ kubectl exec -it <POD_NAME> sh
$ docker ps
$ runc list (show that containers are run by runc)
Build and run applications in a dockerless kubernetes world
What if I want to try it?
$ minikube start 
--network-plugin=cni 
--container-runtime=cri-o 
--bootstrapper=kubeadm
@jorgemoralespou
@jorgemoralespou
libpod/podman
Library (libpod) and CLI (podman) for
managing OCI-based Pods, Containers, and
Container Images
● Replacement for docker cli
○ known CLI
● Integrated with CRI-O (soon)
● No daemon running
@jorgemoralespou
Build and run applications in a dockerless kubernetes world
Demo script
$ podman ps
$ podman images
$ podman run -it --rm -p 8080:80 nginx
$ <ANOTHER TERMINAL> curl http://localhost:8080
$ <ANOTHER TERMINAL> podman ps
$ <ANOTHER TERMINAL> podman logs <CONTAINER_ID>
$ <ANOTHER TERMINAL> podman exec -t <CONTAINER_ID> sh
$ <ANOTHER TERMINAL> ls /etc/nginx
$ podman images
$ podman run -t fedora echo "Hello Riga"
$ podman ps -a
$ cd Dockerfiles
$ podman build -t rigacontainer .
$ podman images
$ podman run -it rigacontainer cat /hello
$ podman ps -a
$ podman rm --all
@jorgemoralespou
skopeo
● Copy images from/to (multiple transports/storages):
○ containers-storage:docker-reference
○ dir:path
○ docker://docker-reference
○ docker-archive:path[:docker-reference]
○ docker-daemon:docker-reference
○ oci:path:tag
○ ostree:image[@/absolute/repo/path]
● Inspect images
● Delete an image from a repository
● Standalone binary / No daemon running
● Perfect for pipelines (e.g. Jenkins)
@jorgemoralespou
Build and run applications in a dockerless kubernetes world
Demo script
$ systemctl start docker
$ docker images
$ podman images
COPY IMAGE
$ skopeo copy containers-storage:riga/example:latest docker-daemon:riga/example:latest
$ docker images
$ docker run -it --rm riga/example cat /hello
$ docker ps -a
$ docker rm $(docker ps -qa)
$ skopeo inspect docker-daemon:riga/example:latest
$ skopeo inspect docker:docker.io/library/fedora:latest
@jorgemoralespou
buildah
● Build images
● No daemon running
● shell-like syntax
● Build from Dockerfile(s)
@jorgemoralespou
Build and run applications in a dockerless kubernetes world
Demo script
$ cd ~/Dockerfiles
$ skopeo copy containers-storage:registry.fedoraproject.org/fedora:latest docker-daemon:fedora:latest
$ docker build -t riga/example-docker .
$ docker history riga/example
$ docker history riga/example-docker
$ buildah bud -t riga/buildah-dockerfile
$ container=(buildah from fedora)
$ echo $container
$ buildah containers
$ buildah config --author "Jorge" --label "METADATA=Built with buildah" $container
$ buildah inspect $container
$ buildah run $container bash
# echo “Hello Riga, built by Buildah” > /hello
# ls /
# cat /hello
# exit
$ buildah commit $container riga/example-buildah
$ podman run -it riga/example-buildah cat /hello
@jorgemoralespou
@jorgemoralespou
Daemon-less Dockerfile builds
● Consume a Dockerfile, but build image without a docker daemon
● Pros
○ Docker build-like experience (just write a Dockerfile)
○ Potentially more control over image layers (combine or shard)
○ Aim is for greater security
● Cons
○ Dockerfile fidelity might make difficult some use cases
○ Different approaches to image layer construction
@jorgemoralespou
Daemon-less Dockerfile builds
● Buildah
○ a tool that facilitates building OCI container images
● Img
○ Standalone, daemon-less, unprivileged Dockerfile and OCI compatible
container image builder.
○ The commands/UX are the same as docker (drop-in replacement)
● Kaniko
○ kaniko is a tool to build OCI container images from a Dockerfile, inside a
container or Kubernetes cluster
○ executes each command within a Dockerfile completely in userspace
● more...
@jorgemoralespou
Dockerfile-less builds
● User input is source / intent: “I want to run a Node.js web server”
● Pros:
○ Less configuration
○ Tools can intelligently build layers, better/safe layer caching
○ Docker image best practices can be codified into tools
● Cons:
○ Less flexible - Opinionated builds
○ Very fragmented across vendors, no real standard
@jorgemoralespou
Dockerfile-less builds
● Source to Image
○ User provides source, source gets built+layered into an application image
○ Dependent on ecosystem of framework/language builder images
● Buildpacks
○ Invented by Heroku, adopted by Cloud Foundry / Deis
○ User provides source, “build” produces “slug”, “export” produces container image
● FTL (Faster than light)
○ Purpose-built source to image builders per-language, goal is layer-per-dependency
○ Insight: turn build incrementality into deploy incrementality
● Bazel
○ Google’s OSS build system, supports declarative image builds
○ Used for user-mode Docker image builds for 3+ years
@jorgemoralespou
“Our ancestors called it
magic, but you call it
[computer] science.
I come from a land where
they are one and the same.”
—THOR
@jorgemoralespou
And don’t forget to
tweet if you liked it
(or if you didn’t)
@jorgemoralespou
@jorgemoralespou

More Related Content

What's hot (20)

PDF
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDays
CodeOps Technologies LLP
 
PDF
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
PPTX
Dockerize the World
damovsky
 
PDF
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
Natale Vinto
 
PPTX
Introduction to docker
removed_b0e2342824f6227286f54ba461ebc0fe
 
PDF
Docker and Go: why did we decide to write Docker in Go?
Jérôme Petazzoni
 
PDF
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
Mando Stam
 
PDF
Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker, Inc.
 
PPTX
Learn docker in 90 minutes
Larry Cai
 
PDF
OpenShift As A DevOps Platform
Lalatendu Mohanty
 
PDF
[KubeCon EU 2020] containerd Deep Dive
Akihiro Suda
 
PDF
Docker Continuous Delivery Workshop
Jirayut Nimsaeng
 
PPTX
Surveillance on slam technology
GMO-Z.com Vietnam Lab Center
 
PDF
[DockerCon 2019] Hardening Docker daemon with Rootless mode
Akihiro Suda
 
PDF
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
PDF
ISC HPCW talks
Akihiro Suda
 
PDF
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
Akihiro Suda
 
PDF
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
Akihiro Suda
 
PDF
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar
 
PDF
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDays
CodeOps Technologies LLP
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
dotCloud
 
Dockerize the World
damovsky
 
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
Natale Vinto
 
Docker and Go: why did we decide to write Docker in Go?
Jérôme Petazzoni
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
Mando Stam
 
Docker Platform Internals: Taking runtimes and image creation to the next lev...
Docker, Inc.
 
Learn docker in 90 minutes
Larry Cai
 
OpenShift As A DevOps Platform
Lalatendu Mohanty
 
[KubeCon EU 2020] containerd Deep Dive
Akihiro Suda
 
Docker Continuous Delivery Workshop
Jirayut Nimsaeng
 
Surveillance on slam technology
GMO-Z.com Vietnam Lab Center
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
Akihiro Suda
 
Use the Source or Join the Dark Side: differences between Docker Community an...
Jérôme Petazzoni
 
ISC HPCW talks
Akihiro Suda
 
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
Akihiro Suda
 
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
Akihiro Suda
 
Openbar 7 - Leuven - OpenShift - The Enterprise Container Platform - Piros
Openbar
 
A Shift from Monolith to Microservice using Docker
Ajeet Singh Raina
 

Similar to Build and run applications in a dockerless kubernetes world (20)

PDF
Build and run applications in a dockerless kubernetes world - DevConf India 18
Jorge Morales
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PDF
Containers without docker | DevNation Tech Talk
Red Hat Developers
 
PDF
fabric8 ... and Docker, Kubernetes & OpenShift
roland.huss
 
PPTX
Docker and kubernetes
Dongwon Kim
 
PDF
Docker-v3.pdf
Bruno Cornec
 
PDF
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Erica Windisch
 
PDF
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Partner S.A.
 
PPTX
Docker Ecosystem on Azure
Patrick Chanezon
 
PDF
Docker and-containers-for-development-and-deployment-scale12x
rkr10
 
PPTX
Docker Container As A Service - JAX 2016
Patrick Chanezon
 
PDF
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
PPTX
Introduction to Docker
Nissan Dookeran
 
PDF
Docker for developers
andrzejsydor
 
PDF
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
PDF
Présentation de Docker
Proto204
 
PDF
A Gentle Introduction to Docker and Containers
Docker, Inc.
 
PDF
Docker, what's next ?
DevOps Indonesia
 
Build and run applications in a dockerless kubernetes world - DevConf India 18
Jorge Morales
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Containers without docker | DevNation Tech Talk
Red Hat Developers
 
fabric8 ... and Docker, Kubernetes & OpenShift
roland.huss
 
Docker and kubernetes
Dongwon Kim
 
Docker-v3.pdf
Bruno Cornec
 
Docker for Developers: Dev, Test, Deploy @ BucksCo Devops at MeetMe HQ
Erica Windisch
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Partner S.A.
 
Docker Ecosystem on Azure
Patrick Chanezon
 
Docker and-containers-for-development-and-deployment-scale12x
rkr10
 
Docker Container As A Service - JAX 2016
Patrick Chanezon
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Jérôme Petazzoni
 
Introduction to Docker
Nissan Dookeran
 
Docker for developers
andrzejsydor
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
Erica Windisch
 
Présentation de Docker
Proto204
 
A Gentle Introduction to Docker and Containers
Docker, Inc.
 
Docker, what's next ?
DevOps Indonesia
 
Ad

More from Jorge Morales (8)

PDF
OpenShift for developers in action! - jbcnconf19
Jorge Morales
 
PDF
Put the dev back in devops - Cloud-native at local speed! - RH Summit 19
Jorge Morales
 
PDF
Automating with operators - FossAsia Summit 2019
Jorge Morales
 
PDF
Odo improving the developer experience on OpenShift - hack &amp; sangria
Jorge Morales
 
PDF
Mastering java in containers - MadridJUG
Jorge Morales
 
PDF
Automating stateful applications with kubernetes operators - Openstack Summit...
Jorge Morales
 
PDF
Improving the developer experience on OpenShift - devconf-india-18
Jorge Morales
 
PDF
I tried to dockerize my app but I had to PaaS
Jorge Morales
 
OpenShift for developers in action! - jbcnconf19
Jorge Morales
 
Put the dev back in devops - Cloud-native at local speed! - RH Summit 19
Jorge Morales
 
Automating with operators - FossAsia Summit 2019
Jorge Morales
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Jorge Morales
 
Mastering java in containers - MadridJUG
Jorge Morales
 
Automating stateful applications with kubernetes operators - Openstack Summit...
Jorge Morales
 
Improving the developer experience on OpenShift - devconf-india-18
Jorge Morales
 
I tried to dockerize my app but I had to PaaS
Jorge Morales
 
Ad

Recently uploaded (20)

DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 

Build and run applications in a dockerless kubernetes world

  • 1. Build and run applications in a Dockerless Kubernetes world Jorge Morales OpenShift Developer Advocate Riga Dev Days 2018
  • 2. Me (aka Jorge Morales) ● Spanish by nature and by language ● Work at Red Hat ● OpenShift Developer Advocate ● Mostly Java developer ● Obsessed with improving the developer experience @jorgemoralespou github.com/jorgemoralespou http://jorgemoral.es
  • 5. Kernel namespaces: sandboxing processes from one another Control Groups (cgroups): control process resource allocations Security: capabilities drop (seccomp), Mandatory access control (SELinux, Apparmor) Linux Containers @jorgemoralespou
  • 11. With scale came complexity
  • 13. OTHER ORCHESTRATORS (Cloud Foundry Diego, Nomad, Blox, etc.) 2 YEARS AGO Fragmented landscape TODAY Kubernetes consolidation OTHER ORCHESTRATORS CONTAINER ORCHESTRATION LANDSCAPE @jorgemoralespou
  • 14. Why kubernetes? #1: Open source, backed by giants #2: Vibrant and fast growing community #3: Supported on all clouds #4: Great partnerships @jorgemoralespou
  • 15. Started slow June 2014 Docker 1.0 Dec 2014 Kubernetes 1.0: Supports Docker containers Rkt 0.1.0 July 2015 @jorgemoralespou
  • 16. then more runtimes showed up Rkt 1.0 Feb 2016 Kubernetes 1.3: Supports Docker and Rkt containers July 2016 June 2014 Docker 1.0 Dec 2014 Kubernetes 1.0: Supports Docker containers Rkt 0.1.0 July 2015 @jorgemoralespou
  • 17. and code got messy @jorgemoralespou
  • 18. “Change is the essential process of all of existence.” —SPOCK
  • 19. Standardize containers ● Runtime spec (runc = Reference implementation) ● Image spec ● Distribution spec (proposal) @jorgemoralespou
  • 20. Use API/Interfaces to Container Runtimes KUBELET FRAKTI OCI-RUNTIME RUNC DOCKERD RKT CONTAINER RUNTIME INTERFACE (CRI) DOCKERD RKT KUBELET @jorgemoralespou
  • 21. Standardization became a fact Rkt 1.0 Feb 2016 Kubernetes 1.3: Supports Docker and Rkt containers July 2016 June 2014 Docker 1.0 Dec 2014 Kubernetes 1.0: Supports Docker containers Rkt 0.1.0 July 2015 Dec 2016 Kubernetes 1.5: Container Runtime Interface (CRI) alpha July 2017 Kubernetes 1.7: CRI support GA @jorgemoralespou
  • 22. What is Container Runtime Interface (CRI)? ● A gRPC interface and a group of libraries ● Enables Kubernetes to use a wide variety of container runtimes ● Introduced in Kubernetes 1.5 ● GA in Kubernetes 1.7 @jorgemoralespou
  • 24. CRI-O ● Open source & Open governance ● Lean, Stable, Secure and BORING! ○ Tied to the CRI ○ No features that can mine stability and performance ○ Shaped around Kubernetes ○ Only supported user is Kubernetes ○ Versioning and Support are tied to Kubernetes @jorgemoralespou
  • 25. Man, this guy is so boring! When is the live demo? @jorgemoralespou
  • 26. Demo script SHOW DOCKER AND STOP IT $ docker images $ systemctl stop docker $ docker images RUN A CONTAINER WITH OC/KUBECTL $ kubectl get pods $ kubectl run --image=nginx --port=80 nginx $ kubectl expose deployment nginx --port=80 $ kubectl get svc $ curl http://<CLUSTER-IP> $ oc expose svc/nginx-http $ oc get route $ kubectl get pods $ kubectl logs -f <POD_NAME> $ kubectl exec -it <POD_NAME> sh $ docker ps $ runc list (show that containers are run by runc)
  • 28. What if I want to try it? $ minikube start --network-plugin=cni --container-runtime=cri-o --bootstrapper=kubeadm @jorgemoralespou
  • 30. libpod/podman Library (libpod) and CLI (podman) for managing OCI-based Pods, Containers, and Container Images ● Replacement for docker cli ○ known CLI ● Integrated with CRI-O (soon) ● No daemon running @jorgemoralespou
  • 32. Demo script $ podman ps $ podman images $ podman run -it --rm -p 8080:80 nginx $ <ANOTHER TERMINAL> curl http://localhost:8080 $ <ANOTHER TERMINAL> podman ps $ <ANOTHER TERMINAL> podman logs <CONTAINER_ID> $ <ANOTHER TERMINAL> podman exec -t <CONTAINER_ID> sh $ <ANOTHER TERMINAL> ls /etc/nginx $ podman images $ podman run -t fedora echo "Hello Riga" $ podman ps -a $ cd Dockerfiles $ podman build -t rigacontainer . $ podman images $ podman run -it rigacontainer cat /hello $ podman ps -a $ podman rm --all
  • 34. skopeo ● Copy images from/to (multiple transports/storages): ○ containers-storage:docker-reference ○ dir:path ○ docker://docker-reference ○ docker-archive:path[:docker-reference] ○ docker-daemon:docker-reference ○ oci:path:tag ○ ostree:image[@/absolute/repo/path] ● Inspect images ● Delete an image from a repository ● Standalone binary / No daemon running ● Perfect for pipelines (e.g. Jenkins) @jorgemoralespou
  • 36. Demo script $ systemctl start docker $ docker images $ podman images COPY IMAGE $ skopeo copy containers-storage:riga/example:latest docker-daemon:riga/example:latest $ docker images $ docker run -it --rm riga/example cat /hello $ docker ps -a $ docker rm $(docker ps -qa) $ skopeo inspect docker-daemon:riga/example:latest $ skopeo inspect docker:docker.io/library/fedora:latest
  • 38. buildah ● Build images ● No daemon running ● shell-like syntax ● Build from Dockerfile(s) @jorgemoralespou
  • 40. Demo script $ cd ~/Dockerfiles $ skopeo copy containers-storage:registry.fedoraproject.org/fedora:latest docker-daemon:fedora:latest $ docker build -t riga/example-docker . $ docker history riga/example $ docker history riga/example-docker $ buildah bud -t riga/buildah-dockerfile $ container=(buildah from fedora) $ echo $container $ buildah containers $ buildah config --author "Jorge" --label "METADATA=Built with buildah" $container $ buildah inspect $container $ buildah run $container bash # echo “Hello Riga, built by Buildah” > /hello # ls / # cat /hello # exit $ buildah commit $container riga/example-buildah $ podman run -it riga/example-buildah cat /hello
  • 43. Daemon-less Dockerfile builds ● Consume a Dockerfile, but build image without a docker daemon ● Pros ○ Docker build-like experience (just write a Dockerfile) ○ Potentially more control over image layers (combine or shard) ○ Aim is for greater security ● Cons ○ Dockerfile fidelity might make difficult some use cases ○ Different approaches to image layer construction @jorgemoralespou
  • 44. Daemon-less Dockerfile builds ● Buildah ○ a tool that facilitates building OCI container images ● Img ○ Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder. ○ The commands/UX are the same as docker (drop-in replacement) ● Kaniko ○ kaniko is a tool to build OCI container images from a Dockerfile, inside a container or Kubernetes cluster ○ executes each command within a Dockerfile completely in userspace ● more... @jorgemoralespou
  • 45. Dockerfile-less builds ● User input is source / intent: “I want to run a Node.js web server” ● Pros: ○ Less configuration ○ Tools can intelligently build layers, better/safe layer caching ○ Docker image best practices can be codified into tools ● Cons: ○ Less flexible - Opinionated builds ○ Very fragmented across vendors, no real standard @jorgemoralespou
  • 46. Dockerfile-less builds ● Source to Image ○ User provides source, source gets built+layered into an application image ○ Dependent on ecosystem of framework/language builder images ● Buildpacks ○ Invented by Heroku, adopted by Cloud Foundry / Deis ○ User provides source, “build” produces “slug”, “export” produces container image ● FTL (Faster than light) ○ Purpose-built source to image builders per-language, goal is layer-per-dependency ○ Insight: turn build incrementality into deploy incrementality ● Bazel ○ Google’s OSS build system, supports declarative image builds ○ Used for user-mode Docker image builds for 3+ years @jorgemoralespou
  • 47. “Our ancestors called it magic, but you call it [computer] science. I come from a land where they are one and the same.” —THOR
  • 49. And don’t forget to tweet if you liked it (or if you didn’t) @jorgemoralespou @jorgemoralespou