SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
DevNation
Containers without docker
Cedric Clyburn
OpenShift Developer Advocate, Red Hat
1
2
What motivated you to come to this talk?
Agenda
3
Why run containers without docker?
Alternatives
Demo!
4
Hi, I’m Cedric Clyburn!
Who am I?
$ whoami
OpenShift Developer Advocate at Red Hat. Student at NC State University!
Love Kubernetes ☸ , Open Source Software, and Video Creation 🎥
Red Hat Developer Getting
Started Series
@cedricclyburn
cedricclyburn
5
Why run containers
without docker?
Why do we use Docker?
Why not use Docker?
Are there alternatives?
6
Why are we using containers in the first place?
7
Applications running in containers can
easily be deployed to different platforms
and clouds
Consistent operation
Increased portability
DevOps teams know applications will run
the same, and containers support agile
efforts
Less overhead
Containers require less system resources
than traditional or hardware VM
environments
Benefits of containers
Since emerging in 2013, containers have exploded
in popularity due to Docker
▸ Consists of the Docker Engine
・ Client (docker)
・ Server (daemon)
▸ Pioneered/supported standardization of
container technology
8
Why Docker is so widely adopted for managing containers.
Docker’s role in containers
Open Container Initiative
Created as a standard for running/managing container images.
9
▸ Created by Docker, Red Hat, et al. in June 2015
▸ Makes sure all container runtimes can run images produced by any
build tool by creating industry standards
・ Runtime specification
・ Image specification
Docker has a few long-standing concerns for
engineers and developers alike.
▸ Security downsides of Docker
▸ Needs a daemon to run, as well as root
privileges
▸ Dockershim depreciation in K8s v1.24
10
It can make a big difference!
Why care about what engine we use?
Docker now isn’t the only
container engine in the
ecosystem.
11
12
- Podman
- Buildah
Alternatives
▸ Buildah is a daemonless (and rootless) tool to
produce OCI compliant images
▸ Can build images from Dockerfiles
▸ Handy as part of the CI/CD pipeline
13
▸ Podman is a daemonless (and rootless) open
source container engine for developing,
managing, and running OCI Containers
▸ Directly interacts with image registry,
containers, and image storage with runC
Two powerful tools that can replace Docker functionality.
Alternatives to using Docker
Why switch from Docker to
Podman and Buildah?
14
Great question!
While a great tool, Docker is monolithic and tries to do
everything instead of specializing in a few different
features.
Docker is a monolithic tool
Docker has been the standard for working with containers,
but is far from being the only container engine. Learning
others can help us understand more about containerization.
To understand containers better
With the K8s dockershim depreciation and move to
containerd/cri-o, companies are moving towards
alternative tools for working with containers.
Industry is rapidly advancing
15
- Podman: Running
containers
- Buildah: Building image
from a Dockerfile
- Podman: Pushing
images to registries
- Bonus: Using Skopeo
to migrate images
Demo time!
1 $ sudo dnf -y install podman
Installed:
podman-1:3.4.2-9.module+el8.5.0+13852+150547f7.x86_64
$
Getting
Started with
Podman
1 Installing Podman on
RHEL/CentOS
16
Getting
Started with
Podman
1
2
Installing Podman on
RHEL/CentOS
Verify installation
17
2 $ podman --version
podman version 3.4.2
$
Getting
Started with
Podman
1
2
Installing Podman on
RHEL/CentOS
Verify installation
18
3 $ podman run -dt -p 8080:80/tcp docker.io/library/httpd
Trying to pull docker.io/library/httpd:latest...
Getting image source signatures
Copying blob 4f53b8f15873 done
Copying blob 3b60f356ab85 done
Copying blob 1805d911aae4 done
Copying blob c229119241af done
Copying blob e3709b515d9c done
Copying config 118b6abfbf done
Writing manifest to image destination
Storing signatures
03d2a46a928cfa57427caa1fd6afd4cc7a6a2d61a2b4a431a6d1d30
6a6aefe26
$
3 Run a httpd container
Getting
Started with
Podman
1
2
Installing Podman on
RHEL/CentOS
Verify installation
19
4 $ podman ps
CONTAINER ID IMAGE COMMAND CREATED
STATUS
docker.io/library/httpd:latest httpd-foreground 25 seconds ago
Up 26 seconds ago
PORTS NAMES
0.0.0.0:8080->80/tcp nostalgic_almeida
$
3 Run a httpd container
4 Check container status
Getting
Started with
Podman
1
2
Installing Podman on
RHEL/CentOS
Verify installation
20
5 $ curl http://localhost:8080
<html><body><h1>It works!</h1></body></html>
$
3 Run a httpd container
4 Check container status
5 Test the httpd container
1 $ sudo dnf -y install buildah
Installed:
buildah-1:1.23.1-2.module+el8.5.0+13436+9c05b4ba.x86_64
$
Getting
Started with
Buildah
1 Installing Buildah on
RHEL/CentOS
21
Getting
Started with
Buildah
1
2
Installing Buildah on
RHEL/CentOS
Verify installation
22
2 $ buildah --version
buildah version 1.23.1 (image-spec 1.0.1-dev, runtime-spec 1.0.2-dev)
$
Getting
Started with
Buildah
1
2
Installing Buildah on
RHEL/CentOS
Verify installation
23
3 $ git clone https://github.com/pacroy/flask-app
Cloning into 'flask-app'...
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 28 (delta 4), reused 27 (delta 3), pack-reused 0
Unpacking objects: 100% (28/28), 19.78 MiB | 14.00 MiB/s, done.
$ cd flask-app
$ ls
app.py Dockerfile requirements.txt templates
$ cat Dockerfile
3 Pull a git repo with a cool
demo
Getting
Started with
Buildah
1
2
Installing Buildah on
RHEL/CentOS
Verify installation
24
4 $ buildah bud -t flask-app .
STEP 1/9: FROM alpine:3.5
Resolved "alpine" as an alias
(/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/alpine:3.5...
…
$ buildah images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/flask-app latest bd2f0ba33d4d 32 seconds ago
65.7 MB
$ ls
app.py Dockerfile requirements.txt templates
$ cat Dockerfile
3 Pull a git repo with a cool
demo
4 Build-from-Dockerfile using
Buildah
Getting
Started with
Buildah
1
2
Installing Buildah on
RHEL/CentOS
Verify installation
25
5 $ podman run -d -p 5000:5000 --events-backend=file flask-app
5a2b312048442f104cf6601af922436e2589b1cf083c7f7385bc2d21
ea18dc3f
$
3 Pull a git repo with a cool
demo
4 Build-from-Dockerfile using
Buildah
5 Run the container from the
local image
Publish images
to
Docker/Quay
1 Authenticate on the
registry
26
1 $ podman login docker.io
Username: cedricclyburn
Password:
Login Succeeded!
$
Publish images
to
Docker/Quay
1
2
Authenticate on the
registry
Push image just like using
Docker
27
2 $ podman push flask-app docker.io/cedricclyburn/flask-app
Getting image source signatures
Copying blob f566c57e6f2d skipped: already exists
Copying blob 92b59f4c9ef0 done
Copying config a6bc29a90c done
Writing manifest to image destination
Storing signatures
$
Skopeo is a specialized tool to perform various
operations on images & image repositories.
▸ Ability to inspect a remote image without
pulling it to the host
▸ Copy an image from and to registries
▸ Daemonless and rootless
Optional section marker or title
28
Not to worry, Skopeo can help
Oh shoot! Docker started enforcing rate limits!
Getting
Started with
Skopeo
1 Installing Skopeo on
RHEL/CentOS
29
1 $ sudo dnf -y install skopeo
Installed:
skopeo-2:1.5.2-1.module+el8.5.0+13517+4134e2e1.x86_64
$
Getting
Started with
Skopeo
1
2
Installing Skopeo on
RHEL/CentOS
Login to Docker Hub &
Quay if you haven’t already
30
2 $ skopeo login docker.io
$ skopeo login quay.io
Getting
Started with
Skopeo
1
2
Installing Skopeo on
RHEL/CentOS
Login to Docker Hub &
Quay if you haven’t already
31
3 $ skopeo inspect docker://cedricclyburn/flask-app
{
"Name": "docker.io/cedricclyburn/flask-app",
"Digest":
"sha256:cb514a90d0ca805e24e5cb7c98d1ba1d33d583ca375211ef
ccb89adca88ca724",
"RepoTags": [
"latest"
],
…
$
3 Test inspecting your image
Getting
Started with
Skopeo
1
2
Installing Skopeo on
RHEL/CentOS
Login to Docker Hub &
Quay if you haven’t already
32
4 $ skopeo copy docker://cedricclyburn/flask-app:latest
docker://quay.io/cclyburn/flask-app:latest
Getting image source signatures
Copying blob 8cae0e1ac61c skipped: already exists
Copying blob 3ac9880798ec skipped: already exists
Copying config a6bc29a90c done
Writing manifest to image destination
Storing signatures
$
3 Test inspecting your image
4 Copy the image over to the
new registry
Closing remarks
A few things to remember before we finish up
33
This talk isn’t meant to persuade you to completely ditch Docker, but instead to
show you the larger tool landscape for building, running, managing, and
distributing containers. Every tool has it’s pros and cons, and having alternatives
for any form of technology is inherently a good thing!
34
Containers without docker
DevNation
Thank you!
Cedric Clyburn
OpenShift Developer Advocate
@cedricclyburn

Contenu connexe

Similaire à Containers without docker | DevNation Tech Talk

Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
Patrick Mizer
 

Similaire à Containers without docker | DevNation Tech Talk (20)

Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday development
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
OpenShift Commons - Adopting Podman, Skopeo and Buildah for Building and Mana...
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
 
Docker puebla bday #4 celebration
Docker puebla bday #4 celebrationDocker puebla bday #4 celebration
Docker puebla bday #4 celebration
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
Docker for Deep Learning (Andrea Panizza)
Docker for Deep Learning (Andrea Panizza)Docker for Deep Learning (Andrea Panizza)
Docker for Deep Learning (Andrea Panizza)
 
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
Podman, Buildah, and Quarkus - The Latest in Linux Containers Technologies
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Faster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker PlatformFaster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker Platform
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
Running the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker ContainerRunning the Oracle SOA Suite Environment in a Docker Container
Running the Oracle SOA Suite Environment in a Docker Container
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Docker for Fun and Profit
Docker for Fun and ProfitDocker for Fun and Profit
Docker for Fun and Profit
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 

Plus de Red Hat Developers

Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Red Hat Developers
 

Plus de Red Hat Developers (20)

DevNation Tech Talk: Getting GitOps
DevNation Tech Talk: Getting GitOpsDevNation Tech Talk: Getting GitOps
DevNation Tech Talk: Getting GitOps
 
Exploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on KubernetesExploring the power of OpenTelemetry on Kubernetes
Exploring the power of OpenTelemetry on Kubernetes
 
GitHub Makeover | DevNation Tech Talk
GitHub Makeover | DevNation Tech TalkGitHub Makeover | DevNation Tech Talk
GitHub Makeover | DevNation Tech Talk
 
Quinoa: A modern Quarkus UI with no hassles | DevNation tech Talk
Quinoa: A modern Quarkus UI with no hassles | DevNation tech TalkQuinoa: A modern Quarkus UI with no hassles | DevNation tech Talk
Quinoa: A modern Quarkus UI with no hassles | DevNation tech Talk
 
Extra micrometer practices with Quarkus | DevNation Tech Talk
Extra micrometer practices with Quarkus | DevNation Tech TalkExtra micrometer practices with Quarkus | DevNation Tech Talk
Extra micrometer practices with Quarkus | DevNation Tech Talk
 
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
 
Integrating Loom in Quarkus | DevNation Tech Talk
Integrating Loom in Quarkus | DevNation Tech TalkIntegrating Loom in Quarkus | DevNation Tech Talk
Integrating Loom in Quarkus | DevNation Tech Talk
 
Quarkus Renarde 🦊♥: an old-school Web framework with today's touch | DevNatio...
Quarkus Renarde 🦊♥: an old-school Web framework with today's touch | DevNatio...Quarkus Renarde 🦊♥: an old-school Web framework with today's touch | DevNatio...
Quarkus Renarde 🦊♥: an old-school Web framework with today's touch | DevNatio...
 
Distributed deployment of microservices across multiple OpenShift clusters | ...
Distributed deployment of microservices across multiple OpenShift clusters | ...Distributed deployment of microservices across multiple OpenShift clusters | ...
Distributed deployment of microservices across multiple OpenShift clusters | ...
 
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
 
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
 
11 CLI tools every developer should know | DevNation Tech Talk
11 CLI tools every developer should know | DevNation Tech Talk11 CLI tools every developer should know | DevNation Tech Talk
11 CLI tools every developer should know | DevNation Tech Talk
 
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkA Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
 
GitHub Actions and OpenShift: ​​Supercharging your software development loops...
GitHub Actions and OpenShift: ​​Supercharging your software development loops...GitHub Actions and OpenShift: ​​Supercharging your software development loops...
GitHub Actions and OpenShift: ​​Supercharging your software development loops...
 
To the moon and beyond with Java 17 APIs! | DevNation Tech Talk
To the moon and beyond with Java 17 APIs! | DevNation Tech TalkTo the moon and beyond with Java 17 APIs! | DevNation Tech Talk
To the moon and beyond with Java 17 APIs! | DevNation Tech Talk
 
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
 
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
 
Kubernetes configuration and security policies with KubeLinter | DevNation Te...
Kubernetes configuration and security policies with KubeLinter | DevNation Te...Kubernetes configuration and security policies with KubeLinter | DevNation Te...
Kubernetes configuration and security policies with KubeLinter | DevNation Te...
 
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
Level-up your gaming telemetry using Kafka Streams | DevNation Tech TalkLevel-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
 
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Containers without docker | DevNation Tech Talk

  • 1. DevNation Containers without docker Cedric Clyburn OpenShift Developer Advocate, Red Hat 1
  • 2. 2 What motivated you to come to this talk?
  • 3. Agenda 3 Why run containers without docker? Alternatives Demo!
  • 4. 4 Hi, I’m Cedric Clyburn! Who am I? $ whoami OpenShift Developer Advocate at Red Hat. Student at NC State University! Love Kubernetes ☸ , Open Source Software, and Video Creation 🎥 Red Hat Developer Getting Started Series @cedricclyburn cedricclyburn
  • 6. Why do we use Docker? Why not use Docker? Are there alternatives? 6
  • 7. Why are we using containers in the first place? 7 Applications running in containers can easily be deployed to different platforms and clouds Consistent operation Increased portability DevOps teams know applications will run the same, and containers support agile efforts Less overhead Containers require less system resources than traditional or hardware VM environments Benefits of containers
  • 8. Since emerging in 2013, containers have exploded in popularity due to Docker ▸ Consists of the Docker Engine ・ Client (docker) ・ Server (daemon) ▸ Pioneered/supported standardization of container technology 8 Why Docker is so widely adopted for managing containers. Docker’s role in containers
  • 9. Open Container Initiative Created as a standard for running/managing container images. 9 ▸ Created by Docker, Red Hat, et al. in June 2015 ▸ Makes sure all container runtimes can run images produced by any build tool by creating industry standards ・ Runtime specification ・ Image specification
  • 10. Docker has a few long-standing concerns for engineers and developers alike. ▸ Security downsides of Docker ▸ Needs a daemon to run, as well as root privileges ▸ Dockershim depreciation in K8s v1.24 10 It can make a big difference! Why care about what engine we use?
  • 11. Docker now isn’t the only container engine in the ecosystem. 11
  • 13. ▸ Buildah is a daemonless (and rootless) tool to produce OCI compliant images ▸ Can build images from Dockerfiles ▸ Handy as part of the CI/CD pipeline 13 ▸ Podman is a daemonless (and rootless) open source container engine for developing, managing, and running OCI Containers ▸ Directly interacts with image registry, containers, and image storage with runC Two powerful tools that can replace Docker functionality. Alternatives to using Docker
  • 14. Why switch from Docker to Podman and Buildah? 14 Great question! While a great tool, Docker is monolithic and tries to do everything instead of specializing in a few different features. Docker is a monolithic tool Docker has been the standard for working with containers, but is far from being the only container engine. Learning others can help us understand more about containerization. To understand containers better With the K8s dockershim depreciation and move to containerd/cri-o, companies are moving towards alternative tools for working with containers. Industry is rapidly advancing
  • 15. 15 - Podman: Running containers - Buildah: Building image from a Dockerfile - Podman: Pushing images to registries - Bonus: Using Skopeo to migrate images Demo time!
  • 16. 1 $ sudo dnf -y install podman Installed: podman-1:3.4.2-9.module+el8.5.0+13852+150547f7.x86_64 $ Getting Started with Podman 1 Installing Podman on RHEL/CentOS 16
  • 17. Getting Started with Podman 1 2 Installing Podman on RHEL/CentOS Verify installation 17 2 $ podman --version podman version 3.4.2 $
  • 18. Getting Started with Podman 1 2 Installing Podman on RHEL/CentOS Verify installation 18 3 $ podman run -dt -p 8080:80/tcp docker.io/library/httpd Trying to pull docker.io/library/httpd:latest... Getting image source signatures Copying blob 4f53b8f15873 done Copying blob 3b60f356ab85 done Copying blob 1805d911aae4 done Copying blob c229119241af done Copying blob e3709b515d9c done Copying config 118b6abfbf done Writing manifest to image destination Storing signatures 03d2a46a928cfa57427caa1fd6afd4cc7a6a2d61a2b4a431a6d1d30 6a6aefe26 $ 3 Run a httpd container
  • 19. Getting Started with Podman 1 2 Installing Podman on RHEL/CentOS Verify installation 19 4 $ podman ps CONTAINER ID IMAGE COMMAND CREATED STATUS docker.io/library/httpd:latest httpd-foreground 25 seconds ago Up 26 seconds ago PORTS NAMES 0.0.0.0:8080->80/tcp nostalgic_almeida $ 3 Run a httpd container 4 Check container status
  • 20. Getting Started with Podman 1 2 Installing Podman on RHEL/CentOS Verify installation 20 5 $ curl http://localhost:8080 <html><body><h1>It works!</h1></body></html> $ 3 Run a httpd container 4 Check container status 5 Test the httpd container
  • 21. 1 $ sudo dnf -y install buildah Installed: buildah-1:1.23.1-2.module+el8.5.0+13436+9c05b4ba.x86_64 $ Getting Started with Buildah 1 Installing Buildah on RHEL/CentOS 21
  • 22. Getting Started with Buildah 1 2 Installing Buildah on RHEL/CentOS Verify installation 22 2 $ buildah --version buildah version 1.23.1 (image-spec 1.0.1-dev, runtime-spec 1.0.2-dev) $
  • 23. Getting Started with Buildah 1 2 Installing Buildah on RHEL/CentOS Verify installation 23 3 $ git clone https://github.com/pacroy/flask-app Cloning into 'flask-app'... remote: Enumerating objects: 28, done. remote: Counting objects: 100% (28/28), done. remote: Compressing objects: 100% (23/23), done. remote: Total 28 (delta 4), reused 27 (delta 3), pack-reused 0 Unpacking objects: 100% (28/28), 19.78 MiB | 14.00 MiB/s, done. $ cd flask-app $ ls app.py Dockerfile requirements.txt templates $ cat Dockerfile 3 Pull a git repo with a cool demo
  • 24. Getting Started with Buildah 1 2 Installing Buildah on RHEL/CentOS Verify installation 24 4 $ buildah bud -t flask-app . STEP 1/9: FROM alpine:3.5 Resolved "alpine" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf) Trying to pull docker.io/library/alpine:3.5... … $ buildah images REPOSITORY TAG IMAGE ID CREATED SIZE localhost/flask-app latest bd2f0ba33d4d 32 seconds ago 65.7 MB $ ls app.py Dockerfile requirements.txt templates $ cat Dockerfile 3 Pull a git repo with a cool demo 4 Build-from-Dockerfile using Buildah
  • 25. Getting Started with Buildah 1 2 Installing Buildah on RHEL/CentOS Verify installation 25 5 $ podman run -d -p 5000:5000 --events-backend=file flask-app 5a2b312048442f104cf6601af922436e2589b1cf083c7f7385bc2d21 ea18dc3f $ 3 Pull a git repo with a cool demo 4 Build-from-Dockerfile using Buildah 5 Run the container from the local image
  • 26. Publish images to Docker/Quay 1 Authenticate on the registry 26 1 $ podman login docker.io Username: cedricclyburn Password: Login Succeeded! $
  • 27. Publish images to Docker/Quay 1 2 Authenticate on the registry Push image just like using Docker 27 2 $ podman push flask-app docker.io/cedricclyburn/flask-app Getting image source signatures Copying blob f566c57e6f2d skipped: already exists Copying blob 92b59f4c9ef0 done Copying config a6bc29a90c done Writing manifest to image destination Storing signatures $
  • 28. Skopeo is a specialized tool to perform various operations on images & image repositories. ▸ Ability to inspect a remote image without pulling it to the host ▸ Copy an image from and to registries ▸ Daemonless and rootless Optional section marker or title 28 Not to worry, Skopeo can help Oh shoot! Docker started enforcing rate limits!
  • 29. Getting Started with Skopeo 1 Installing Skopeo on RHEL/CentOS 29 1 $ sudo dnf -y install skopeo Installed: skopeo-2:1.5.2-1.module+el8.5.0+13517+4134e2e1.x86_64 $
  • 30. Getting Started with Skopeo 1 2 Installing Skopeo on RHEL/CentOS Login to Docker Hub & Quay if you haven’t already 30 2 $ skopeo login docker.io $ skopeo login quay.io
  • 31. Getting Started with Skopeo 1 2 Installing Skopeo on RHEL/CentOS Login to Docker Hub & Quay if you haven’t already 31 3 $ skopeo inspect docker://cedricclyburn/flask-app { "Name": "docker.io/cedricclyburn/flask-app", "Digest": "sha256:cb514a90d0ca805e24e5cb7c98d1ba1d33d583ca375211ef ccb89adca88ca724", "RepoTags": [ "latest" ], … $ 3 Test inspecting your image
  • 32. Getting Started with Skopeo 1 2 Installing Skopeo on RHEL/CentOS Login to Docker Hub & Quay if you haven’t already 32 4 $ skopeo copy docker://cedricclyburn/flask-app:latest docker://quay.io/cclyburn/flask-app:latest Getting image source signatures Copying blob 8cae0e1ac61c skipped: already exists Copying blob 3ac9880798ec skipped: already exists Copying config a6bc29a90c done Writing manifest to image destination Storing signatures $ 3 Test inspecting your image 4 Copy the image over to the new registry
  • 33. Closing remarks A few things to remember before we finish up 33 This talk isn’t meant to persuade you to completely ditch Docker, but instead to show you the larger tool landscape for building, running, managing, and distributing containers. Every tool has it’s pros and cons, and having alternatives for any form of technology is inherently a good thing!
  • 34. 34 Containers without docker DevNation Thank you! Cedric Clyburn OpenShift Developer Advocate @cedricclyburn