SlideShare a Scribd company logo
Welcome to CIALUG!
Linux Container Showdown
Andrew Denner
Central Iowa Linux Users Group
November Meeting
Welcome to
LUG
Meetings are on the third Wednesday
of every month
We have a website!
http://www.cialug.org
List Server
IRC/Slack
Linux News Roundup
About our presenter
• Some say that he has no face, all we know
is that he is the presenter…
About me (in all seriousness)
• I write code, sometimes have
to dabble in devops and by
night I do linuxy things
• These statements are my own,
not those of anyone else
including my employer and the
commissioner of baseball
• Twitter: adenner
• Slides will be posted to
http://denner.co
On with the show
The Linux Container showdown
Concepts
Virtual machine (VM)
Container
Central Iowa Linux Users Group: November Meeting -- Container showdown
Central Iowa Linux Users Group: November Meeting -- Container showdown
Central Iowa Linux Users Group: November Meeting -- Container showdown
Central Iowa Linux Users Group: November Meeting -- Container showdown
Early History
chroot
• 1979 chroot on version 7
• “A chroot on Unix operating systems is
an operation that changes the apparent
root directory for the current running
process and its children. A program that
is run in such a modified environment
cannot name files outside the
designated directory tree.” –Wikipedia
• It isn’t perfect
Demo
• J=$HOME/jail
• mkdir -p $J
• mkdir -p $J/{bin,lib64,lib}
• mkdir $J/lib/x86_64-linux-gnu/
• cd $J
• cp -v /bin/{bash,ls} $J/bin
• ldd /bin/bash
• list="$(ldd /bin/bash | egrep -o
'/lib.*.[0-9]')"; for i in $list; do
cp -v "$i" "${J}${i}"; done
• list="$(ldd /bin/ls | egrep -o
'/lib.*.[0-9]')"; for i in $list; do
cp -v "$i" "${J}${i}"; done
• chroot $J /bin/bash
• ls /
Demo
BSD Jails
First in 1999 Free BSD by Poul-
Henning Kamp after use in a small
hosting company
Achieved three
goals:
Virtualization
Security
Ease of Delagation
Each jail is custom rolled/built
Single point of failure
Solaris Zones
First relased 2004 in build
51 beta of Solaris 10
Can control what resources
each zone gets and also can
just give a fair share
Still present in Illumonos
(Open Solaris) and Solaris
openVZ
• Open Virtuozzo
• Soft memory allocation, can be shared if
not being used
• Old versions used chroot based disk
isolation. Current version lets each
container have it’s own file system
• Requires Custom Kernel providing:
• Virtualization
• Isolation
• Resource Management
• checkpointing
LXC
• Uses Linux cgroups and other namespace
isolations
• Much like jails
• Works with the vanilla kernel unlike
openVZ
• Orriginally docker used
Modern history
Docker
• Opensourced in 2013
• Building on the previous ideas
• Image ecosystem
• More ephemeral and portable across
machines
• Versioning
• Overlayfs
• Downsides: still single point of failure
• Dockerd root—security concerns
Central Iowa Linux Users Group: November Meeting -- Container showdown
Central Iowa Linux Users Group: November Meeting -- Container showdown
Central Iowa Linux Users Group: November Meeting -- Container showdown
Central Iowa Linux Users Group: November Meeting -- Container showdown
Docker File
Central Iowa Linux Users Group: November Meeting -- Container showdown
Rootless Docker
• Thanks to Akihiro Suda of NTT Corp for all his work
• See
https://www.slideshare.net/AkihiroSuda/dockercon-
2019-hardening-docker-daemon-with-rootless-mode for
deep dive
• Works as sub-user and sub-group ids
• Overlay fs doesn’t work yet
• Can’t use protected ports
• https://www.katacoda.com/courses/docker/rootless
CNCF
• In the beginning there was docker…
• Then came others and the CNCF is the vender nuteral home for the
plumbing that runs containers
• It is a part of the linux foundation
• Think of like apache but for containerization
• Home to
• Kubernetes
• Prometheus
• Envoy
• Containerd
• Et. al.
Central Iowa Linux Users Group: November Meeting -- Container showdown
Pouch
• https://pouchcontainer.io
• From Alibaba Group
• Never had heard of them before
• Distributes images via Dragonfly p2p
• Rich container mode more hooks and magic available
Kata
Containers
• Kata Containers is an open source project
and community working to build a standard
implementation of lightweight Virtual
Machines (VMs) that feel and perform like
containers, but provide the workload
isolation and security advantages of VMs.
• https://katacontainers.io
Central Iowa Linux Users Group: November Meeting -- Container showdown
Moby
https://mobyproject.org
An open framework to
assemble specialized container
systems without reinventing
the wheel.
Not for mere mortals
Central Iowa Linux Users Group: November Meeting -- Container showdown
Docker
Compose
• Yaml tool for defining and running multiple
docker applications at the same time
• Useful for:
• dev environments
• Automated test environments
• Single host deployments
Central Iowa Linux Users Group: November Meeting -- Container showdown
Docker Swarm
Joins a Pool of docker hosts into one
virtual host
YAML based definitions
Networking via an overlay network
Easier to set up than a K8 cluster
VHS vs Betamax
Kubernetes
• Originally designed by Google engineers –Borg
• Orchestrate containers across multiple hosts.
• Make better use of hardware to maximize
resources needed to run your enterprise apps.
• Control and automate application deployments and
updates.
• Mount and add storage to run stateful apps.
• Scale containerized applications and their
resources on the fly.
• Declaratively manage services, which guarantees
the deployed applications are always running how
you deployed them.
• Health-check and self-heal your apps with
autoplacement, autorestart, autoreplication, and
autoscaling.
Central Iowa Linux Users Group: November Meeting -- Container showdown
K3s
• Kubernetes abrieated is K8… 5 less than
that is k3s
• K8 but only the good parts all in less than
40mb
• Still rather experimental
• Got rid of Legacy alpha and non-default
code removed
• Removed most in-tree plugins
• Use sqlite 3 rather than etcd by default
• Simple launcher
K3s cont.
• Minimal requirements, leverages
• containerd
• Flannel
• CoreDNS
• CNI
• Host utilities (iptables, socat, etc)
• Install from
https://github.com/rancher/k3s
• Demo:
https://asciinema.org/a/k6lHGEZ65
le2rxm5giAxJOR7C
Podman
• New in Centos 8
• See presentation last month
• Biggest thing to note is no need for the
docker damon
• Can handle Rootless same as docker, with
same shortcomings
• https://asciinema.org/a/oDxbleQ4q0ww6
WpS46JUy1dt0
Central Iowa Linux Users Group: November Meeting -- Container showdown
Buildah
• Container management and build program
• Can build and use CNF protable images
without a local docker
• Better control of image layers
• Ability to build images via bash
• As well as building dockerfile images
• Demo:
https://asciinema.org/a/peZtZjTkeZHtUm
AN5AdnWPp2i
• https://asciinema.org/a/V4NZWIdV83CcOP
DW4favh4vi3
Example script

More Related Content

PPTX
Docker for the new Era: Introducing Docker,its components and tools
PPTX
Containers and Cloud: From LXC to Docker to Kubernetes
PDF
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
PPTX
Containerization and Docker
PDF
Introduction to docker
PDF
Introduction to Docker - Docker workshop @Twitter
PDF
Understand how docker works
PPTX
Docker introduction
Docker for the new Era: Introducing Docker,its components and tools
Containers and Cloud: From LXC to Docker to Kubernetes
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
Containerization and Docker
Introduction to docker
Introduction to Docker - Docker workshop @Twitter
Understand how docker works
Docker introduction

What's hot (20)

PDF
Docker Introduction
PPTX
Docker Basics
PDF
Docker architecture-04-1
PDF
Mobycraft - Docker in 8-bit by Aditya Gupta
PPTX
Introduction to Docker - What is it and how is it compared to VM's
PDF
DockerCon SF 2015: Docker Security
PDF
Introduction to Containers and Docker
PDF
Introduction to container based virtualization with docker
PPTX
Cohesion Techsessie Docker - Daniel Palstra
PPTX
Virtualization, Containers, Docker and scalable container management services
PPTX
Docker intro
PDF
Intro to containerization
PDF
JOSA TechTalk: Introduction to docker
PPTX
Introduction to Docker
PDF
Docker 101: An Introduction
PDF
Intro To Docker
PPT
Docker introduction
PDF
Introduction to Docker
PDF
DCA. certificate slide Session 1
PDF
Shipping Applications to Production in Containers with Docker
Docker Introduction
Docker Basics
Docker architecture-04-1
Mobycraft - Docker in 8-bit by Aditya Gupta
Introduction to Docker - What is it and how is it compared to VM's
DockerCon SF 2015: Docker Security
Introduction to Containers and Docker
Introduction to container based virtualization with docker
Cohesion Techsessie Docker - Daniel Palstra
Virtualization, Containers, Docker and scalable container management services
Docker intro
Intro to containerization
JOSA TechTalk: Introduction to docker
Introduction to Docker
Docker 101: An Introduction
Intro To Docker
Docker introduction
Introduction to Docker
DCA. certificate slide Session 1
Shipping Applications to Production in Containers with Docker
Ad

Similar to Central Iowa Linux Users Group: November Meeting -- Container showdown (20)

PDF
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
PDF
Docker_AGH_v0.1.3
PDF
Evolution of containers to kubernetes
PDF
The internals and the latest trends of container runtimes
PDF
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
PDF
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
PDF
Containerization Is More than the New Virtualization
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
PDF
Docker from basics to orchestration (PHPConfBr2015)
PDF
Docker and-containers-for-development-and-deployment-scale12x
PDF
Docker handons-workshop-for-charity
PDF
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
PDF
Docker presentation | Paris Docker Meetup
PDF
Victor Vieux at Docker Paris Meetup #1
PDF
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
PDF
Local Kubernetes for Dummies: STLLUG March 2021
PDF
Docker Introduction + what is new in 0.9
PDF
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
PPT
2 Linux Container and Docker
PDF
Docker and Containers for Development and Deployment — SCALE12X
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...
Docker_AGH_v0.1.3
Evolution of containers to kubernetes
The internals and the latest trends of container runtimes
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker I YaC 2013
Containerization Is More than the New Virtualization
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker from basics to orchestration (PHPConfBr2015)
Docker and-containers-for-development-and-deployment-scale12x
Docker handons-workshop-for-charity
Docker Intro at the Google Developer Group and Google Cloud Platform Meet Up
Docker presentation | Paris Docker Meetup
Victor Vieux at Docker Paris Meetup #1
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
Local Kubernetes for Dummies: STLLUG March 2021
Docker Introduction + what is new in 0.9
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
2 Linux Container and Docker
Docker and Containers for Development and Deployment — SCALE12X
Ad

More from Andrew Denner (20)

PDF
All about Time, or how to stop from going back to the future
PPTX
CIALUG October 2022 linux news
PPTX
January 2022: Central Iowa Linux Users Group: Git
PDF
Cialug August 2021
PDF
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...
PDF
St Louis Linux Users Group Wireguard (for Fun and Networking)
PDF
Central Iowa Linux Users Group: August 2020 Jupyter Lab
PDF
Central Iowa Linux Users Group June 2020 Meeting Apache Guacamole
PDF
A brief intro to Ansible-CIALUG March 2020
PDF
Central Iowa Linux Users Group May 2020 Meeting: WireGuard
PDF
Central Iowa Linux Users Group-December 2019: Windows Managers
PPTX
Central Iowa Linux Users Group October Meeting: Centos 8
PDF
Intro to networking
PDF
A Brief overview of Linux, or How I learned to stop worrying and love the pen...
PPTX
August CIALUG meeting: Debian buster
PDF
Central Iowa Linux Users group July 2019--Jupyter Notebook on a Raspberry Pi
PDF
CIALUG June 2019: Raspberry Pi Facial Recognition
PDF
CIALUG May 2019 Meeting: An intro to docker and using rootless docker
PPTX
July 18, 2018 Central Iowa Linux User's Group: Tor onion services
PDF
CIALUG: Encrypt all the things
All about Time, or how to stop from going back to the future
CIALUG October 2022 linux news
January 2022: Central Iowa Linux Users Group: Git
Cialug August 2021
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...
St Louis Linux Users Group Wireguard (for Fun and Networking)
Central Iowa Linux Users Group: August 2020 Jupyter Lab
Central Iowa Linux Users Group June 2020 Meeting Apache Guacamole
A brief intro to Ansible-CIALUG March 2020
Central Iowa Linux Users Group May 2020 Meeting: WireGuard
Central Iowa Linux Users Group-December 2019: Windows Managers
Central Iowa Linux Users Group October Meeting: Centos 8
Intro to networking
A Brief overview of Linux, or How I learned to stop worrying and love the pen...
August CIALUG meeting: Debian buster
Central Iowa Linux Users group July 2019--Jupyter Notebook on a Raspberry Pi
CIALUG June 2019: Raspberry Pi Facial Recognition
CIALUG May 2019 Meeting: An intro to docker and using rootless docker
July 18, 2018 Central Iowa Linux User's Group: Tor onion services
CIALUG: Encrypt all the things

Recently uploaded (20)

PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
Digital Literacy And Online Safety on internet
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
QR Codes Qr codecodecodecodecocodedecodecode
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
The Internet -By the Numbers, Sri Lanka Edition
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
innovation process that make everything different.pptx
introduction about ICD -10 & ICD-11 ppt.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
WebRTC in SignalWire - troubleshooting media negotiation
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Cloud-Scale Log Monitoring _ Datadog.pdf
Module 1 - Cyber Law and Ethics 101.pptx
PptxGenJS_Demo_Chart_20250317130215833.pptx
Digital Literacy And Online Safety on internet
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Triggering QUIC, presented by Geoff Huston at IETF 123
Paper PDF World Game (s) Great Redesign.pdf
Introuction about ICD -10 and ICD-11 PPT.pptx
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
QR Codes Qr codecodecodecodecocodedecodecode
An introduction to the IFRS (ISSB) Stndards.pdf
INTERNET------BASICS-------UPDATED PPT PRESENTATION
The New Creative Director: How AI Tools for Social Media Content Creation Are...
The Internet -By the Numbers, Sri Lanka Edition
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
innovation process that make everything different.pptx

Central Iowa Linux Users Group: November Meeting -- Container showdown

  • 2. Linux Container Showdown Andrew Denner Central Iowa Linux Users Group November Meeting
  • 3. Welcome to LUG Meetings are on the third Wednesday of every month We have a website! http://www.cialug.org List Server IRC/Slack
  • 5. About our presenter • Some say that he has no face, all we know is that he is the presenter…
  • 6. About me (in all seriousness) • I write code, sometimes have to dabble in devops and by night I do linuxy things • These statements are my own, not those of anyone else including my employer and the commissioner of baseball • Twitter: adenner • Slides will be posted to http://denner.co
  • 7. On with the show The Linux Container showdown
  • 14. chroot • 1979 chroot on version 7 • “A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name files outside the designated directory tree.” –Wikipedia • It isn’t perfect
  • 15. Demo • J=$HOME/jail • mkdir -p $J • mkdir -p $J/{bin,lib64,lib} • mkdir $J/lib/x86_64-linux-gnu/ • cd $J • cp -v /bin/{bash,ls} $J/bin • ldd /bin/bash • list="$(ldd /bin/bash | egrep -o '/lib.*.[0-9]')"; for i in $list; do cp -v "$i" "${J}${i}"; done • list="$(ldd /bin/ls | egrep -o '/lib.*.[0-9]')"; for i in $list; do cp -v "$i" "${J}${i}"; done • chroot $J /bin/bash • ls /
  • 16. Demo
  • 17. BSD Jails First in 1999 Free BSD by Poul- Henning Kamp after use in a small hosting company Achieved three goals: Virtualization Security Ease of Delagation Each jail is custom rolled/built Single point of failure
  • 18. Solaris Zones First relased 2004 in build 51 beta of Solaris 10 Can control what resources each zone gets and also can just give a fair share Still present in Illumonos (Open Solaris) and Solaris
  • 19. openVZ • Open Virtuozzo • Soft memory allocation, can be shared if not being used • Old versions used chroot based disk isolation. Current version lets each container have it’s own file system • Requires Custom Kernel providing: • Virtualization • Isolation • Resource Management • checkpointing
  • 20. LXC • Uses Linux cgroups and other namespace isolations • Much like jails • Works with the vanilla kernel unlike openVZ • Orriginally docker used
  • 22. Docker • Opensourced in 2013 • Building on the previous ideas • Image ecosystem • More ephemeral and portable across machines • Versioning • Overlayfs • Downsides: still single point of failure • Dockerd root—security concerns
  • 29. Rootless Docker • Thanks to Akihiro Suda of NTT Corp for all his work • See https://www.slideshare.net/AkihiroSuda/dockercon- 2019-hardening-docker-daemon-with-rootless-mode for deep dive • Works as sub-user and sub-group ids • Overlay fs doesn’t work yet • Can’t use protected ports • https://www.katacoda.com/courses/docker/rootless
  • 30. CNCF • In the beginning there was docker… • Then came others and the CNCF is the vender nuteral home for the plumbing that runs containers • It is a part of the linux foundation • Think of like apache but for containerization • Home to • Kubernetes • Prometheus • Envoy • Containerd • Et. al.
  • 32. Pouch • https://pouchcontainer.io • From Alibaba Group • Never had heard of them before • Distributes images via Dragonfly p2p • Rich container mode more hooks and magic available
  • 33. Kata Containers • Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. • https://katacontainers.io
  • 35. Moby https://mobyproject.org An open framework to assemble specialized container systems without reinventing the wheel. Not for mere mortals
  • 37. Docker Compose • Yaml tool for defining and running multiple docker applications at the same time • Useful for: • dev environments • Automated test environments • Single host deployments
  • 39. Docker Swarm Joins a Pool of docker hosts into one virtual host YAML based definitions Networking via an overlay network Easier to set up than a K8 cluster
  • 41. Kubernetes • Originally designed by Google engineers –Borg • Orchestrate containers across multiple hosts. • Make better use of hardware to maximize resources needed to run your enterprise apps. • Control and automate application deployments and updates. • Mount and add storage to run stateful apps. • Scale containerized applications and their resources on the fly. • Declaratively manage services, which guarantees the deployed applications are always running how you deployed them. • Health-check and self-heal your apps with autoplacement, autorestart, autoreplication, and autoscaling.
  • 43. K3s • Kubernetes abrieated is K8… 5 less than that is k3s • K8 but only the good parts all in less than 40mb • Still rather experimental • Got rid of Legacy alpha and non-default code removed • Removed most in-tree plugins • Use sqlite 3 rather than etcd by default • Simple launcher
  • 44. K3s cont. • Minimal requirements, leverages • containerd • Flannel • CoreDNS • CNI • Host utilities (iptables, socat, etc) • Install from https://github.com/rancher/k3s • Demo: https://asciinema.org/a/k6lHGEZ65 le2rxm5giAxJOR7C
  • 45. Podman • New in Centos 8 • See presentation last month • Biggest thing to note is no need for the docker damon • Can handle Rootless same as docker, with same shortcomings • https://asciinema.org/a/oDxbleQ4q0ww6 WpS46JUy1dt0
  • 47. Buildah • Container management and build program • Can build and use CNF protable images without a local docker • Better control of image layers • Ability to build images via bash • As well as building dockerfile images • Demo: https://asciinema.org/a/peZtZjTkeZHtUm AN5AdnWPp2i • https://asciinema.org/a/V4NZWIdV83CcOP DW4favh4vi3

Editor's Notes

  • #11: https://xkcd.com/2221/
  • #12: Cattle vs Pets Bill Baker 2012
  • #13: You wouldn’t do this to your pet…
  • #15: If you are root you can escape It doesn’t handle non file system isolations, i.e. processes etc
  • #17: https://www.cyberciti.biz/faq/unix-linux-chroot-command-examples-usage-syntax/
  • #18: Virtualization: Each jail is a virtual environment running on the host machine with its own files, processes, user and superuser accounts. From within a jailed process, the environment is almost indistinguishable from a real system. Security: Each jail is sealed from the others, thus providing an additional level of security. Ease of delegation: The limited scope of a jail allows system administrators to delegate several tasks which require superuser access without handing out complete control over the system
  • #31: Kubernetes- Orchestration Prometheus monitoring Envoy network proxy Core dns service discovery Containerd Fluentd logging Jaeger distributed tracing Vitess storage
  • #32: Daemon that manages complete lifecycle from image transfer and storage to execution and storage and beyond
  • #34: It is a drop in additional OCI compatible container runtime, which can therefore be used with Docker and Kubernetes.
  • #42: Redhat openshift Ranchr