SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
Copyright©2018 NTT Corp. All Rights Reserved.
Akihiro Suda ( @_AkihiroSuda_ )
NTT Software Innovation Center
Comparing Next-Generation
Container Image Building Tools
Open Source Summit Japan (June 20-22, 2018)
2
Copyright©2018 NTT Corp. All Rights Reserved.
• Software Engineer at NTT
• GitHub: @AkihiroSuda
• Twitter: @_AkihiroSuda_
• Docker Moby core maintainer
• In April 2017, Docker [ as a project ] transited into Moby
• Now Docker [ as a product ] has been developed as one of
downstreams of Moby
: ~ :
RHEL Fedora
Who am I
3
Copyright©2018 NTT Corp. All Rights Reserved.
• BuildKit initial maintainer
• Next-generation `docker build`
• containerd maintainer
• Industry-standard container runtime
• Can be used as a Docker-replacement for Kubernetes
• Docker Tokyo Community Leader (meetup organizer)
• https://dockerjp.connpass.com/
Who am I
4
Copyright©2018 NTT Corp. All Rights Reserved.
• Problems of `docker build`
• New image builder tools
• Comparison & Evaluation
• CBI: "Container Builder Interface"
Agenda
BuildKit img
Bazelkaniko
Buildah
Source-to-Image Metaparticle
umoci&orca
5
Copyright©2018 NTT Corp. All Rights Reserved.
• Shell-script-like language for building Docker container
images
• Each of the lines is cached as a Copy-on-Write filesystem
layer, e.g. overlayfs
Introduction to Dockerfile
mount –t overlay 
–o lowerdir=0,upperdir=1 ..
FROM golang:1.10
COPY . /go/src/github.com/foo/bar
RUN go build –o /bar github.com/foo/bar
mount –t overlay 
–o lowerdir=1,upperdir=2 ..
6
Copyright©2018 NTT Corp. All Rights Reserved.
• Supports transferring files between stages, starting with
Docker 17.05
• Effectively reduces the size of the final image
Introduction to Dockerfile
FROM golang:1.10 AS foobar
COPY . /go/src/github.com/foo/bar
RUN go build –o /bar github.com/foo/bar
FROM alpine:3.7
COPY –-from=foobar /bar /
copy "bar" to
the final stage
7
Copyright©2018 NTT Corp. All Rights Reserved.
• Docker-integrated tool for building images using
Dockerfile
• Requires Docker daemon to be running
• Similar to `docker run`, but some features are intentionally
removed for security reason
• No volumes (`docker run -v`, `docker run --mount`)
• No privileged mode (`docker run –-privileged`)
Introduction to `docker build`
8
Copyright©2018 NTT Corp. All Rights Reserved.
• Modifying a single line always invalidates the caches of
the subsequent lines
• N-th line is assumed to always depend on the (N-1)-th line
• A user needs to arrange the instructions carefully for
efficient caching
Problem: inefficient caching
FROM debian
EXPOSE 80
RUN apt update && apt install –y HEAVY-PACKAGES
Modifying this line always invalidates the apt cache
due to the false dependency
9
Copyright©2018 NTT Corp. All Rights Reserved.
• A multi-stage Dockerfile has DAG structure
Problem: no concurrency
FROM golang AS stage0
...
RUN go build –o /foo ...
FROM clang AS stage1
...
RUN clang –o /bar ...
FROM debian AS stage2
COPY --from=stage0 /foo /usr/local/bin/foo
COPY --from=stage1 /bar /usr/local/bin/bar
0
2
1
Directed Acyclic Graph
has concurrency
10
Copyright©2018 NTT Corp. All Rights Reserved.
• A multi-stage Dockerfile has DAG structure
Problem: no concurrency
FROM golang AS stage0
...
RUN go build –o /foo ...
FROM clang AS stage1
...
RUN clang –o /bar ...
FROM debian AS stage2
COPY --from=stage0 /foo /usr/local/bin/foo
COPY --from=stage1 /bar /usr/local/bin/bar
0
2
1
0
1
2
Actual `docker build`
implementation (Sequential)
11
Copyright©2018 NTT Corp. All Rights Reserved.
• No safe way to access private assets (e.g. Git repos, S3)
from build containers
• Copying credentials using `COPY` can leak the credential
accidentally
• Needs to be carefully used with either multi-stage or `--squash`
• Env vars are vulnerable to accidents as well
Problem: inaccessible to private assets
FROM ...
COPY id_rsa ~/.ssh
RUN git clone ssh://...
RUN rm –f ~/.ssh/id_rsa The key still remains in the layer!
12
Copyright©2018 NTT Corp. All Rights Reserved.
• Cannot be executed without root privileges
• Important for building images on Kubernetes
• Cannot preserve compiler caches due to lack of volumes
• Unreproducible builds
• Non-deterministic command executions
• Left-pad issue
• Dockerfile can be too complex and hard to maintain
Other problems
13
Copyright©2018 NTT Corp. All Rights Reserved.
• And more!
• FTL, Smith, Ansible Container...
• Some of them still use Dockerfile, others not
• No "silver bullet" solution
Solutions
BuildKit img
Bazelkaniko
Buildah
Source-to-Image Metaparticle
umoci & orca
14
Copyright©2018 NTT Corp. All Rights Reserved.
• Uses DAG-style low-level intermediate language called LLB
• Accurate dependency analysis and cache invalidation
• Vertices can be executed in parallel
• LLB can be compiled from Dockerfile
• And also from 3rd party languages
BuildKit: next-generation `docker build`
Compile
Dockerfile
LLB DAG
3rd party languages
docker-image://alpine
Image
git://foo/bar
docker-image://gcc
Run("apk add ..")Run("make")
https://github.com/moby/buildkit
3 vertices can be executed in parallel
2
15
Copyright©2018 NTT Corp. All Rights Reserved.
• DAG structure of LLB can be described using multi-stage
Dockerfile
BuildKit: next-generation `docker build`
FROM golang AS stage0
...
RUN go build –o /foo ...
FROM clang AS stage1
...
RUN clang –o /bar ...
FROM debian AS stage2
COPY --from=stage0 /foo /usr/local/bin/foo
COPY --from=stage1 /bar /usr/local/bin/bar
0
2
1
16
Copyright©2018 NTT Corp. All Rights Reserved.
BuildKit: next-generation `docker build`
Can be also used for building non-
container artifacts
17
Copyright©2018 NTT Corp. All Rights Reserved.
• Distributed mode is also on plan (#224, #231)
• A worker tells the master its loadavg and LLB DAG vertex cache
info
• The master choose the worker for each of the LLB DAG vertices
using the info from the workers
BuildKit: next-generation `docker build`
Master
Master
Master
LBClient
Worker
Worker
Worker
"I can reproduce cache for vertex sha256:deadbeef!"
18
Copyright©2018 NTT Corp. All Rights Reserved.
• Experimental support for rootless mode
• Runs everything including BuildKit itself as an unprivileged user,
using `user_namespaces(7)`
• Protect the system from potential bugs of BuildKit/containerd/runc.
• Also useful for HPC users
• Requires `newuidmap(1)` and `newgidmap(1)` with SUID bit for `apt`
• No patch for runc is needed since June 2018
• Don't confuse this with `dockerd --userns-remap`
• `dockerd –-userns-remap` still requires `dockerd` itself to be
executed as the root
BuildKit: next-generation `docker build`
19
Copyright©2018 NTT Corp. All Rights Reserved.
• Rootless BuildKit can be executed inside Docker and
Kubernetes
• But requires `--privileged` for let `RUN` containers mount `/proc`
• Will be fixed soon via moby/moby#36644 and
kubernetes/kubernetes#64283
• Still safe because BuildKit works as an unprivileged user
BuildKit: next-generation `docker build`
...
USER penguin
ENTRYPOINT ["rootlesskit", "buildkitd"]
RootlessKit: shim for setting up user NS and mount NS
https://github.com/AkihiroSuda/rootlesskit
20
Copyright©2018 NTT Corp. All Rights Reserved.
• Plan to support "privileged" build as well
• likely to use libentitlement (#238)
• e.g. `buildctl build --entitlements=security.unconfined`
for privileged build
• potential use-cases: GPU, FUSE, ...
BuildKit: next-generation `docker build`
21
Copyright©2018 NTT Corp. All Rights Reserved.
• Supports non-standard Dockerfile "syntax",
e.g. `RUN –-mount`
• `RUN --mount` will also support SSH agent socket file and
secret files (#262)
BuildKit: next-generation `docker build`
# syntax = tonistiigi/dockerfile:runmount20180610
...
RUN --mount=target=/root/.cache,type=cache go build
Cache mount can be useful for compillers (e.g. Go)
and package managers (e.g. apt)
22
Copyright©2018 NTT Corp. All Rights Reserved.
BuildKit: next-generation `docker build`
• Benchmark result (from Tonis's slide: https://t.co/aUKqQCVmXa )
23
Copyright©2018 NTT Corp. All Rights Reserved.
• Will be integrated to Moby & Docker 18.06 (moby/moby#37151)
• No change on the `docker build` command line but you need to
set `DOCKER_BUILDKIT=1`
• Will be released by the end of this month
• Also adopted by OpenFaaS Cloud
• https://github.com/openfaas/openfaas-cloud
• "GitOps for your functions with native GitHub integrations"
BuildKit: next-generation `docker build`
24
Copyright©2018 NTT Corp. All Rights Reserved.
• Developed under Moby's open governance
• But Dockerfile-to-LLB compiler is planned to be moved to Docker,
Inc.'s repo (#425)
• Dockerfile specification is maintained by Docker, Inc.
• LLB allows implementing non-Dockerfile languages
• Any idea for new language?
BuildKit: next-generation `docker build`
25
Copyright©2018 NTT Corp. All Rights Reserved.
• Created by Jessie Frazelle (Microsoft)
• Uses BuildKit as a library but daemonless and has Docker-
like CLI
• Currently no support for running multiple `img` instances with the
same cache directory (#92)
• Rootless mode by default
img: daemonless BuildKit
$ img build –t example.com/foo .
$ img push example.com/foo
$ img save example.com/foo | docker load
https://github.com/genuinetools/img
26
Copyright©2018 NTT Corp. All Rights Reserved.
• Created by Red Hat
• Officially included in RHEL since RHEL 7.5
• Supports Dockerfile, but `buildah run` and `buildah
commit` are supported as well
• as in `docker run` and `docker commit`, without Dockerfile
• Daemonless
• Can be used as a backend of `podman build`
• Podman: Red Hat's daemonless and swarmless Docker-like tool
Buildah: Red Hat's daemonless `docker build`
https://github.com/projectatomic/buildah
27
Copyright©2018 NTT Corp. All Rights Reserved.
• Supports secret volume
• But configuration is globally scoped
• `/etc/containers/mounts.conf`
• e.g. `/usr/share/rhel/secrets:/run/secrets` for allowing all Buildah
containers to access RHEL subscriptions
• Seems to have usability and security concern for other use-cases
• Rootless mode is planned (#386)
Buildah: Red Hat's daemonless `docker build`
28
Copyright©2018 NTT Corp. All Rights Reserved.
• Cache for Dockerfile instructions is not supported but
planned (#601)
• Parallelization is also planned (#633)
• And distributed execution as well
Buildah: Red Hat's daemonless `docker build`
29
Copyright©2018 NTT Corp. All Rights Reserved.
• Created by Aleksa Sarai (SUSE)
• Umoci: Umoci modifies Open Container images
• Unpacks and repacks OCI Image Spec archives (tar+gz and
JSON) into/from OCI Runtime Spec bundles (directories)
• "Pure"-Rootless and daemonless
• Does not require setting up subuids/subgids (which require SUID
binary) for unpacking archives that have multiple UIDs/GIDs
• Uses `user.rootlesscontainers` xattr instead of `chown(2)`
Umoci & Orca: the first rootless and daemonless image builder
https://github.com/openSUSE/umoci
https://github.com/cyphar/orca-build
30
Copyright©2018 NTT Corp. All Rights Reserved.
• Orca: Umoci-based image builder with support for Dockerfile
• Can be used with runROOTLESS for images that require multiple
UIDs/GIDs (typically Debian/Ubuntu apt)
• https://github.com/rootless-containers/runrootless
• Emulates several system calls using `ptrace(2)` and
`user.rootlesscontainers` xattr values (which are set by Umoci)
• No SUID binary is required (but slow)
• Multi-stage Dockerfile and caching are not supported at the moment
• Planned to be integrated into Umoci
• https://twitter.com/lordcyphar/status/987668301890207744
Umoci & Orca: the first rootless and daemonless image builder
31
Copyright©2018 NTT Corp. All Rights Reserved.
• Created by Google
• Kaniko itself needs to be executed in a container, but does
not require `--privileged`
• Execute `RUN` instructions within Kaniko's rootfs and
namespaces
• i.e. `RUN` instructions are executed without creating containers
• Excludes kaniko itself's binary and configuration files on packing
the rootfs archives
• Seems inappropriate for malicious Dockerfiles due to lack of
isolation (#106)
kaniko: "containerless" rootless builder
https://github.com/GoogleCloudPlatform/kaniko
32
Copyright©2018 NTT Corp. All Rights Reserved.
• Bazel: Google's generic build system
• Not specific to containers
• `rules_docker` can build Docker images, but equivalent of `RUN`
instruction is intentionally omitted due to poor reproducibility
Non-Dockerfile based tools
# https://github.com/bazelbuild/rules_docker#container_image
container_image(
name = "app",
base = "@java_base//image",
files = ["//java/com/example/app:Hello_deploy.jar"],
cmd = ["Hello_deploy.jar"]
)
33
Copyright©2018 NTT Corp. All Rights Reserved.
• Source-to-Image: Red Hat OpenShift's build system
• Application developers don't need to write any file for building
images
• S2I base images contain scripts for building applications in the
language-specific way
• e.g. `centos/python-35-centos7` for Python 3.5
• Previous versions depended on Docker, but recent version can
produce Dockerfiles that can be built by other tools
Non-Dockerfile based tools
34
Copyright©2018 NTT Corp. All Rights Reserved.
• Metaparticle: library for cloud-native apps on Kubernetes
• Supports .NET, Go, Java, JS, Python, Ruby, Rust
• Hard to change the target repository without editing source
codes
• Or implementing a new library on top of Metaparticle
• Also provides service-related features
• e.g. sharding HTTP requests based on URL
Non-Dockerfile based tools
from metaparticle import Containerize
@Containerize(package={'repo': 'foo/bar', ...)
def main():
...
35
Copyright©2018 NTT Corp. All Rights Reserved.
• FTL
• Similar to S2I but only for Node.js, Python, and PHP
• Smith
• Supports Oracle's "Microcontainer Manifest"
• Ansible Container
• Supports Ansible Playbook
• README says "no longer under active development"
Non-Dockerfile based tools
36
Copyright©2018 NTT Corp. All Rights Reserved.
Comparison across Dockerfile-based tools
Docker BuildKit img Buildah Orca kaniko
Instruction cache Limited ✔ ✔
Parallelization
✔ ✔ Planned
Distributed
execution
Planned Planned
Daemonless As a
library ✔ ✔ ✔ ✔
Rootless
✔ ✔ Planned ✔ ✔
Requires SUID binary for apt
1 1 2 3
1
37
Copyright©2018 NTT Corp. All Rights Reserved.
Comparison across Dockerfile-based tools
Docker BuildKit img Buildah Orca kaniko
Instruction cache Limited ✔ ✔
Parallelization
✔ ✔ Planned
Distributed
execution
Planned Planned
Daemonless As a
library ✔ ✔ ✔ ✔
Rootless
✔ ✔ Planned ✔ ✔
No SUID required but slow
1 1 2 3
2
38
Copyright©2018 NTT Corp. All Rights Reserved.
Comparison across Dockerfile-based tools
Docker BuildKit img Buildah Orca kaniko
Instruction cache Limited ✔ ✔
Parallelization
✔ ✔ Planned
Distributed
execution
Planned Planned
Daemonless As a
library ✔ ✔ ✔ ✔
Rootless
✔ ✔ Planned ✔ ✔
Executable in containers without `--privileged` but still has security concern
1 1 2 3
3
39
Copyright©2018 NTT Corp. All Rights Reserved.
Benchmark
Average time of Build #1 (5 times)
Average time of Build #2 (5 times)
Always
without cache
Some builders
use cache
Build #1
Build #2
Prune the state
Put a dummy file
Build #1
Build #2
Prune the state
Put a dummy file
...
Simulates
trivial code change
40
Copyright©2018 NTT Corp. All Rights Reserved.
• Benchmark script is available
• https://github.com/AkihiroSuda/buildbench
• Supported tools: Docker, Buildkit, img, Buildah, Kaniko
• Everything is containerized
• Builders (except Kaniko) are configured to use overlayfs
• Tested on Travis CI (June 19, 2018)
• Logs (contains version info and raw data): https://travis-
ci.org/AkihiroSuda/buildbench/builds/393967682
• See also https://github.com/AkihiroSuda/buildbench/issues/5
• 2 bursted vCPUs, 7.5GB RAM
Benchmark
41
Copyright©2018 NTT Corp. All Rights Reserved.
Benchmark: examples/ex01
FROM alpine AS buildc
RUN apk add --no-cache build-base
RUN echo ... > hello.c
COPY . /foo
RUN gcc -o /a.out /hello.c
FROM alpine AS buildgo
RUN apk add --no-cache build-base
RUN apk add --no-cache go
RUN echo ... > hello.go
RUN go build -o /a.out /hello.go
FROM alpine
COPY --from=buildc /a.out /hello1
COPY --from=buildgo /a.out /hello2
Only the cache for the next line
SHOULD be invalidated
on modification of the build ctx
`apk add build-base`
SHOULD NOT be executed twice
42
Copyright©2018 NTT Corp. All Rights Reserved.
Benchmark result: examples/ex01
15.6s
7.9s
10.0s
15.3s
13.2s
1.2s 1.1s
1.9s
13.5s 13.1s
Docker BuildKit img Buildah Kaniko
#1 #2
43
Copyright©2018 NTT Corp. All Rights Reserved.
• Dockerfile used for the development of Moby
• Good example of complex DAG
• 13 stages can be executed in parallel at maximum
• Buildah and Kaniko don't support this DAG at the moment
• `FROM base` results in attempt to pull `docker.io/library/base`
Another benchmark: moby/moby
golang:1.10.3
base
criu registry docker-py swagger frozen-images runtime-dev tomlv vndr containerd proxy gometalinter dockercli tini
dev
runc
44
Copyright©2018 NTT Corp. All Rights Reserved.
Benchmark result: moby/moby
351.8s
278.8s
447.1s
6.4s 1.9s 7.6s
Docker BuildKit img
#1 #2
45
Copyright©2018 NTT Corp. All Rights Reserved.
• My recommendation is BuildKit, but it is not the "silver
bullet"
• disclosure: I'm a maintainer of BuildKit
• Other tools are attractive as well
• Language-specific builders, e.g. S2I
• SUID-less rootless mode, e.g. Orca and Kaniko
• Enterprise support, e.g. Buildah
• Can we define the common interface for all of them?
So.. which one is the best?
46
Copyright©2018 NTT Corp. All Rights Reserved.
• https://github.com/containerbuilding/cbi
• Defines "BuildJob" as a Kubernetes CRD
• Supports several backends
CBI: Container Builder Interface for Kubernetes
CBI
controller
Docker
BuildKit
img
Buildah
GCB
kubectl
Session
Manager
cbictl
Registry
CBI CRD ("buildjob")
CBI plugin API
OCI Distribution Spec
(Docker Registry API)
Note: not an official CNCF/Kubernetes project
47
Copyright©2018 NTT Corp. All Rights Reserved.
CBI: Container Builder Interface for Kubernetes
apiVersion: cbi.containerbuilding.github.io/v1alpha1
kind: BuildJob
metadata:
name: ex0
spec:
registry:
target: example.com/foo/bar
push: true
language:
dockerfile: {}
context:
git:
url: git://github.com/foo/bar
pluginSelector: plugin.name=buildkit
Most plugins accept Dockerfile,
but non-Dockerfile plugins are also supported.
e.g. Source-to-Image
The CBI controller converts "BuildJob" CRD objects
into Kubernetes batch/v1 Job objects
48
Copyright©2018 NTT Corp. All Rights Reserved.
CBI: Container Builder Interface for Kubernetes
apiVersion: cbi.containerbuilding.github.io/v1alpha1
kind: BuildJob
metadata:
name: ex0
spec:
registry:
target: example.com/foo/bar
push: true
language:
dockerfile: {}
context:
git:
url: git://github.com/foo/bar
pluginSelector: plugin.name=buildkit
Also supports ConfigMap, HTTP, S3,
SFTP, and even Dropbox.. (using Rclone)
Registry and Git credentials can be
provided as Kubernetes secret objects
49
Copyright©2018 NTT Corp. All Rights Reserved.
• Supported plugins:
• Docker
• BuildKit
• img
• Buildah
• kaniko
• OpenShift Source-to-Image
• Google Cloud Container Builder
• Managed service for `docker build`
• New plugin can be also added easily as a Kubernetes
service
CBI: Container Builder Interface for Kubernetes
50
Copyright©2018 NTT Corp. All Rights Reserved.
• POC for Skaffold integration is available
(GoogleContainerTools/skaffold#596)
CBI: Container Builder Interface for Kubernetes
apiVersion: skaffold/v1alpha2
kind: Config
build:
artifacts:
- imageName: example.com/foo/bar
deploy:
kubectl:
manifests:
- k8s-pod.yaml
profiles:
- name: cbi
build:
cbi: {}
Deploy a Kubernetes pod using the image
By default the local Docker is used,
but can be easily switched to CBI
(`skaffold dev –p cbi`)
51
Copyright©2018 NTT Corp. All Rights Reserved.
• My recommendation is BuildKit (disclosure: I'm a maintainer)
• Will be integrated to Docker 18.06 experimentally
(planned to be released by the end of this month)
• But other tools are promising as well
• Now is the time for standardization
• https://github.com/containerbuilding/cbi
Conclusion

Más contenido relacionado

La actualidad más candente

왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요Jo Hoon
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux KernelDocker, Inc.
 
SpringBoot 3 Observability
SpringBoot 3 ObservabilitySpringBoot 3 Observability
SpringBoot 3 ObservabilityKnoldus Inc.
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Janusz Nowak
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityWeaveworks
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesQAware GmbH
 
root権限無しでKubernetesを動かす
root権限無しでKubernetesを動かす root権限無しでKubernetesを動かす
root権限無しでKubernetesを動かす Akihiro Suda
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDSunnyvale
 
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkRed Hat Developers
 
GitHub Actions with Node.js
GitHub Actions with Node.jsGitHub Actions with Node.js
GitHub Actions with Node.jsStefan Stölzle
 
Alphorm.com Formation Ansible : Le Guide Complet du Débutant
Alphorm.com Formation Ansible : Le Guide Complet du DébutantAlphorm.com Formation Ansible : Le Guide Complet du Débutant
Alphorm.com Formation Ansible : Le Guide Complet du DébutantAlphorm
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CDHoang Le
 
ArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdfArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdfamanmakwana3
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
OpenShift 4 installation
OpenShift 4 installationOpenShift 4 installation
OpenShift 4 installationRobert Bohne
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Chris Simmonds
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdKohei Tokunaga
 

La actualidad más candente (20)

왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
SpringBoot 3 Observability
SpringBoot 3 ObservabilitySpringBoot 3 Observability
SpringBoot 3 Observability
 
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anyt...
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Helm 3
Helm 3Helm 3
Helm 3
 
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous SecurityHardening Your CI/CD Pipelines with GitOps and Continuous Security
Hardening Your CI/CD Pipelines with GitOps and Continuous Security
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
root権限無しでKubernetesを動かす
root権限無しでKubernetesを動かす root権限無しでKubernetesを動かす
root権限無しでKubernetesを動かす
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
 
GitHub Actions with Node.js
GitHub Actions with Node.jsGitHub Actions with Node.js
GitHub Actions with Node.js
 
Alphorm.com Formation Ansible : Le Guide Complet du Débutant
Alphorm.com Formation Ansible : Le Guide Complet du DébutantAlphorm.com Formation Ansible : Le Guide Complet du Débutant
Alphorm.com Formation Ansible : Le Guide Complet du Débutant
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
ArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdfArgoCD Meetup PPT final.pdf
ArgoCD Meetup PPT final.pdf
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
OpenShift 4 installation
OpenShift 4 installationOpenShift 4 installation
OpenShift 4 installation
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into Containerd
 

Similar a Next-Generation Container Image Building Tools Comparison

Being a Moby maintainer
Being a Moby maintainerBeing a Moby maintainer
Being a Moby maintainerAkihiro Suda
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userAkihiro Suda
 
Open collaboration in the Moby Project
Open collaboration in the Moby ProjectOpen collaboration in the Moby Project
Open collaboration in the Moby ProjectAkihiro Suda
 
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Nico Meisenzahl
 
Docker Barcelona Meetup - An Introduction to BuildKit
Docker Barcelona Meetup - An Introduction to BuildKitDocker Barcelona Meetup - An Introduction to BuildKit
Docker Barcelona Meetup - An Introduction to BuildKitArnaud Porterie
 
Docker based-pipelines
Docker based-pipelinesDocker based-pipelines
Docker based-pipelinesDevOps.com
 
Docker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine EvolutionDocker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine EvolutionPhil Estes
 
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKitAkihiro Suda
 
Building images efficiently and securely on Kubernetes with BuildKit
Building images efficiently and securely on Kubernetes with BuildKitBuilding images efficiently and securely on Kubernetes with BuildKit
Building images efficiently and securely on Kubernetes with BuildKitNTT Software Innovation Center
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power SystemsCesar Maciel
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
LinuxKit Deep Dive
LinuxKit Deep DiveLinuxKit Deep Dive
LinuxKit Deep DiveDocker, Inc.
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshCodefresh
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifeidotCloud
 
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 Daniel Oh
 
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...Nico Meisenzahl
 
DevOpsCon London: How containerized Pipelines can boost your CI/CD
DevOpsCon London: How containerized Pipelines can boost your CI/CDDevOpsCon London: How containerized Pipelines can boost your CI/CD
DevOpsCon London: How containerized Pipelines can boost your CI/CDNico Meisenzahl
 

Similar a Next-Generation Container Image Building Tools Comparison (20)

Being a Moby maintainer
Being a Moby maintainerBeing a Moby maintainer
Being a Moby maintainer
 
ISC HPCW talks
ISC HPCW talksISC HPCW talks
ISC HPCW talks
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root user
 
Open collaboration in the Moby Project
Open collaboration in the Moby ProjectOpen collaboration in the Moby Project
Open collaboration in the Moby Project
 
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
 
Docker Barcelona Meetup - An Introduction to BuildKit
Docker Barcelona Meetup - An Introduction to BuildKitDocker Barcelona Meetup - An Introduction to BuildKit
Docker Barcelona Meetup - An Introduction to BuildKit
 
Docker based-pipelines
Docker based-pipelinesDocker based-pipelines
Docker based-pipelines
 
Docker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine EvolutionDocker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine Evolution
 
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
 
Building images efficiently and securely on Kubernetes with BuildKit
Building images efficiently and securely on Kubernetes with BuildKitBuilding images efficiently and securely on Kubernetes with BuildKit
Building images efficiently and securely on Kubernetes with BuildKit
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power Systems
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
LinuxKit Deep Dive
LinuxKit Deep DiveLinuxKit Deep Dive
LinuxKit Deep Dive
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifei
 
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
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
 
DevOpsCon London: How containerized Pipelines can boost your CI/CD
DevOpsCon London: How containerized Pipelines can boost your CI/CDDevOpsCon London: How containerized Pipelines can boost your CI/CD
DevOpsCon London: How containerized Pipelines can boost your CI/CD
 

Más de Akihiro Suda

20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
20240321 [KubeCon EU Pavilion] Lima.pdf_
20240321 [KubeCon EU Pavilion] Lima.pdf_20240321 [KubeCon EU Pavilion] Lima.pdf_
20240321 [KubeCon EU Pavilion] Lima.pdf_Akihiro Suda
 
20240320 [KubeCon EU Pavilion] containerd.pdf
20240320 [KubeCon EU Pavilion] containerd.pdf20240320 [KubeCon EU Pavilion] containerd.pdf
20240320 [KubeCon EU Pavilion] containerd.pdfAkihiro Suda
 
20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdf20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdfAkihiro Suda
 
[Podman Special Event] Kubernetes in Rootless Podman
[Podman Special Event] Kubernetes in Rootless Podman[Podman Special Event] Kubernetes in Rootless Podman
[Podman Special Event] Kubernetes in Rootless PodmanAkihiro Suda
 
[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilion[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilionAkihiro Suda
 
[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilion[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilionAkihiro Suda
 
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdfAkihiro Suda
 
[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2Akihiro Suda
 
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...Akihiro Suda
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesAkihiro Suda
 
[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilionAkihiro Suda
 
[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilion[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilionAkihiro Suda
 
[Container Plumbing Days 2023] Why was nerdctl made?
[Container Plumbing Days 2023] Why was nerdctl made?[Container Plumbing Days 2023] Why was nerdctl made?
[Container Plumbing Days 2023] Why was nerdctl made?Akihiro Suda
 
[FOSDEM2023] Bit-for-bit reproducible builds with Dockerfile
[FOSDEM2023] Bit-for-bit reproducible builds with Dockerfile[FOSDEM2023] Bit-for-bit reproducible builds with Dockerfile
[FOSDEM2023] Bit-for-bit reproducible builds with DockerfileAkihiro Suda
 
[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] Lima[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] LimaAkihiro Suda
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOSAkihiro Suda
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Akihiro Suda
 
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...Akihiro Suda
 
[Docker Tokyo #35] Docker 20.10
[Docker Tokyo #35] Docker 20.10[Docker Tokyo #35] Docker 20.10
[Docker Tokyo #35] Docker 20.10Akihiro Suda
 

Más de Akihiro Suda (20)

20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
20240321 [KubeCon EU Pavilion] Lima.pdf_
20240321 [KubeCon EU Pavilion] Lima.pdf_20240321 [KubeCon EU Pavilion] Lima.pdf_
20240321 [KubeCon EU Pavilion] Lima.pdf_
 
20240320 [KubeCon EU Pavilion] containerd.pdf
20240320 [KubeCon EU Pavilion] containerd.pdf20240320 [KubeCon EU Pavilion] containerd.pdf
20240320 [KubeCon EU Pavilion] containerd.pdf
 
20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdf20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdf
 
[Podman Special Event] Kubernetes in Rootless Podman
[Podman Special Event] Kubernetes in Rootless Podman[Podman Special Event] Kubernetes in Rootless Podman
[Podman Special Event] Kubernetes in Rootless Podman
 
[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilion[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilion
 
[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilion[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilion
 
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
 
[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2
 
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...
[DockerCon 2023] Reproducible builds with BuildKit for software supply chain ...
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimes
 
[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion
 
[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilion[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilion
 
[Container Plumbing Days 2023] Why was nerdctl made?
[Container Plumbing Days 2023] Why was nerdctl made?[Container Plumbing Days 2023] Why was nerdctl made?
[Container Plumbing Days 2023] Why was nerdctl made?
 
[FOSDEM2023] Bit-for-bit reproducible builds with Dockerfile
[FOSDEM2023] Bit-for-bit reproducible builds with Dockerfile[FOSDEM2023] Bit-for-bit reproducible builds with Dockerfile
[FOSDEM2023] Bit-for-bit reproducible builds with Dockerfile
 
[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] Lima[CNCF TAG-Runtime 2022-10-06] Lima
[CNCF TAG-Runtime 2022-10-06] Lima
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行
 
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
 
[Docker Tokyo #35] Docker 20.10
[Docker Tokyo #35] Docker 20.10[Docker Tokyo #35] Docker 20.10
[Docker Tokyo #35] Docker 20.10
 

Último

GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 

Último (20)

GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 

Next-Generation Container Image Building Tools Comparison

  • 1. Copyright©2018 NTT Corp. All Rights Reserved. Akihiro Suda ( @_AkihiroSuda_ ) NTT Software Innovation Center Comparing Next-Generation Container Image Building Tools Open Source Summit Japan (June 20-22, 2018)
  • 2. 2 Copyright©2018 NTT Corp. All Rights Reserved. • Software Engineer at NTT • GitHub: @AkihiroSuda • Twitter: @_AkihiroSuda_ • Docker Moby core maintainer • In April 2017, Docker [ as a project ] transited into Moby • Now Docker [ as a product ] has been developed as one of downstreams of Moby : ~ : RHEL Fedora Who am I
  • 3. 3 Copyright©2018 NTT Corp. All Rights Reserved. • BuildKit initial maintainer • Next-generation `docker build` • containerd maintainer • Industry-standard container runtime • Can be used as a Docker-replacement for Kubernetes • Docker Tokyo Community Leader (meetup organizer) • https://dockerjp.connpass.com/ Who am I
  • 4. 4 Copyright©2018 NTT Corp. All Rights Reserved. • Problems of `docker build` • New image builder tools • Comparison & Evaluation • CBI: "Container Builder Interface" Agenda BuildKit img Bazelkaniko Buildah Source-to-Image Metaparticle umoci&orca
  • 5. 5 Copyright©2018 NTT Corp. All Rights Reserved. • Shell-script-like language for building Docker container images • Each of the lines is cached as a Copy-on-Write filesystem layer, e.g. overlayfs Introduction to Dockerfile mount –t overlay –o lowerdir=0,upperdir=1 .. FROM golang:1.10 COPY . /go/src/github.com/foo/bar RUN go build –o /bar github.com/foo/bar mount –t overlay –o lowerdir=1,upperdir=2 ..
  • 6. 6 Copyright©2018 NTT Corp. All Rights Reserved. • Supports transferring files between stages, starting with Docker 17.05 • Effectively reduces the size of the final image Introduction to Dockerfile FROM golang:1.10 AS foobar COPY . /go/src/github.com/foo/bar RUN go build –o /bar github.com/foo/bar FROM alpine:3.7 COPY –-from=foobar /bar / copy "bar" to the final stage
  • 7. 7 Copyright©2018 NTT Corp. All Rights Reserved. • Docker-integrated tool for building images using Dockerfile • Requires Docker daemon to be running • Similar to `docker run`, but some features are intentionally removed for security reason • No volumes (`docker run -v`, `docker run --mount`) • No privileged mode (`docker run –-privileged`) Introduction to `docker build`
  • 8. 8 Copyright©2018 NTT Corp. All Rights Reserved. • Modifying a single line always invalidates the caches of the subsequent lines • N-th line is assumed to always depend on the (N-1)-th line • A user needs to arrange the instructions carefully for efficient caching Problem: inefficient caching FROM debian EXPOSE 80 RUN apt update && apt install –y HEAVY-PACKAGES Modifying this line always invalidates the apt cache due to the false dependency
  • 9. 9 Copyright©2018 NTT Corp. All Rights Reserved. • A multi-stage Dockerfile has DAG structure Problem: no concurrency FROM golang AS stage0 ... RUN go build –o /foo ... FROM clang AS stage1 ... RUN clang –o /bar ... FROM debian AS stage2 COPY --from=stage0 /foo /usr/local/bin/foo COPY --from=stage1 /bar /usr/local/bin/bar 0 2 1 Directed Acyclic Graph has concurrency
  • 10. 10 Copyright©2018 NTT Corp. All Rights Reserved. • A multi-stage Dockerfile has DAG structure Problem: no concurrency FROM golang AS stage0 ... RUN go build –o /foo ... FROM clang AS stage1 ... RUN clang –o /bar ... FROM debian AS stage2 COPY --from=stage0 /foo /usr/local/bin/foo COPY --from=stage1 /bar /usr/local/bin/bar 0 2 1 0 1 2 Actual `docker build` implementation (Sequential)
  • 11. 11 Copyright©2018 NTT Corp. All Rights Reserved. • No safe way to access private assets (e.g. Git repos, S3) from build containers • Copying credentials using `COPY` can leak the credential accidentally • Needs to be carefully used with either multi-stage or `--squash` • Env vars are vulnerable to accidents as well Problem: inaccessible to private assets FROM ... COPY id_rsa ~/.ssh RUN git clone ssh://... RUN rm –f ~/.ssh/id_rsa The key still remains in the layer!
  • 12. 12 Copyright©2018 NTT Corp. All Rights Reserved. • Cannot be executed without root privileges • Important for building images on Kubernetes • Cannot preserve compiler caches due to lack of volumes • Unreproducible builds • Non-deterministic command executions • Left-pad issue • Dockerfile can be too complex and hard to maintain Other problems
  • 13. 13 Copyright©2018 NTT Corp. All Rights Reserved. • And more! • FTL, Smith, Ansible Container... • Some of them still use Dockerfile, others not • No "silver bullet" solution Solutions BuildKit img Bazelkaniko Buildah Source-to-Image Metaparticle umoci & orca
  • 14. 14 Copyright©2018 NTT Corp. All Rights Reserved. • Uses DAG-style low-level intermediate language called LLB • Accurate dependency analysis and cache invalidation • Vertices can be executed in parallel • LLB can be compiled from Dockerfile • And also from 3rd party languages BuildKit: next-generation `docker build` Compile Dockerfile LLB DAG 3rd party languages docker-image://alpine Image git://foo/bar docker-image://gcc Run("apk add ..")Run("make") https://github.com/moby/buildkit 3 vertices can be executed in parallel 2
  • 15. 15 Copyright©2018 NTT Corp. All Rights Reserved. • DAG structure of LLB can be described using multi-stage Dockerfile BuildKit: next-generation `docker build` FROM golang AS stage0 ... RUN go build –o /foo ... FROM clang AS stage1 ... RUN clang –o /bar ... FROM debian AS stage2 COPY --from=stage0 /foo /usr/local/bin/foo COPY --from=stage1 /bar /usr/local/bin/bar 0 2 1
  • 16. 16 Copyright©2018 NTT Corp. All Rights Reserved. BuildKit: next-generation `docker build` Can be also used for building non- container artifacts
  • 17. 17 Copyright©2018 NTT Corp. All Rights Reserved. • Distributed mode is also on plan (#224, #231) • A worker tells the master its loadavg and LLB DAG vertex cache info • The master choose the worker for each of the LLB DAG vertices using the info from the workers BuildKit: next-generation `docker build` Master Master Master LBClient Worker Worker Worker "I can reproduce cache for vertex sha256:deadbeef!"
  • 18. 18 Copyright©2018 NTT Corp. All Rights Reserved. • Experimental support for rootless mode • Runs everything including BuildKit itself as an unprivileged user, using `user_namespaces(7)` • Protect the system from potential bugs of BuildKit/containerd/runc. • Also useful for HPC users • Requires `newuidmap(1)` and `newgidmap(1)` with SUID bit for `apt` • No patch for runc is needed since June 2018 • Don't confuse this with `dockerd --userns-remap` • `dockerd –-userns-remap` still requires `dockerd` itself to be executed as the root BuildKit: next-generation `docker build`
  • 19. 19 Copyright©2018 NTT Corp. All Rights Reserved. • Rootless BuildKit can be executed inside Docker and Kubernetes • But requires `--privileged` for let `RUN` containers mount `/proc` • Will be fixed soon via moby/moby#36644 and kubernetes/kubernetes#64283 • Still safe because BuildKit works as an unprivileged user BuildKit: next-generation `docker build` ... USER penguin ENTRYPOINT ["rootlesskit", "buildkitd"] RootlessKit: shim for setting up user NS and mount NS https://github.com/AkihiroSuda/rootlesskit
  • 20. 20 Copyright©2018 NTT Corp. All Rights Reserved. • Plan to support "privileged" build as well • likely to use libentitlement (#238) • e.g. `buildctl build --entitlements=security.unconfined` for privileged build • potential use-cases: GPU, FUSE, ... BuildKit: next-generation `docker build`
  • 21. 21 Copyright©2018 NTT Corp. All Rights Reserved. • Supports non-standard Dockerfile "syntax", e.g. `RUN –-mount` • `RUN --mount` will also support SSH agent socket file and secret files (#262) BuildKit: next-generation `docker build` # syntax = tonistiigi/dockerfile:runmount20180610 ... RUN --mount=target=/root/.cache,type=cache go build Cache mount can be useful for compillers (e.g. Go) and package managers (e.g. apt)
  • 22. 22 Copyright©2018 NTT Corp. All Rights Reserved. BuildKit: next-generation `docker build` • Benchmark result (from Tonis's slide: https://t.co/aUKqQCVmXa )
  • 23. 23 Copyright©2018 NTT Corp. All Rights Reserved. • Will be integrated to Moby & Docker 18.06 (moby/moby#37151) • No change on the `docker build` command line but you need to set `DOCKER_BUILDKIT=1` • Will be released by the end of this month • Also adopted by OpenFaaS Cloud • https://github.com/openfaas/openfaas-cloud • "GitOps for your functions with native GitHub integrations" BuildKit: next-generation `docker build`
  • 24. 24 Copyright©2018 NTT Corp. All Rights Reserved. • Developed under Moby's open governance • But Dockerfile-to-LLB compiler is planned to be moved to Docker, Inc.'s repo (#425) • Dockerfile specification is maintained by Docker, Inc. • LLB allows implementing non-Dockerfile languages • Any idea for new language? BuildKit: next-generation `docker build`
  • 25. 25 Copyright©2018 NTT Corp. All Rights Reserved. • Created by Jessie Frazelle (Microsoft) • Uses BuildKit as a library but daemonless and has Docker- like CLI • Currently no support for running multiple `img` instances with the same cache directory (#92) • Rootless mode by default img: daemonless BuildKit $ img build –t example.com/foo . $ img push example.com/foo $ img save example.com/foo | docker load https://github.com/genuinetools/img
  • 26. 26 Copyright©2018 NTT Corp. All Rights Reserved. • Created by Red Hat • Officially included in RHEL since RHEL 7.5 • Supports Dockerfile, but `buildah run` and `buildah commit` are supported as well • as in `docker run` and `docker commit`, without Dockerfile • Daemonless • Can be used as a backend of `podman build` • Podman: Red Hat's daemonless and swarmless Docker-like tool Buildah: Red Hat's daemonless `docker build` https://github.com/projectatomic/buildah
  • 27. 27 Copyright©2018 NTT Corp. All Rights Reserved. • Supports secret volume • But configuration is globally scoped • `/etc/containers/mounts.conf` • e.g. `/usr/share/rhel/secrets:/run/secrets` for allowing all Buildah containers to access RHEL subscriptions • Seems to have usability and security concern for other use-cases • Rootless mode is planned (#386) Buildah: Red Hat's daemonless `docker build`
  • 28. 28 Copyright©2018 NTT Corp. All Rights Reserved. • Cache for Dockerfile instructions is not supported but planned (#601) • Parallelization is also planned (#633) • And distributed execution as well Buildah: Red Hat's daemonless `docker build`
  • 29. 29 Copyright©2018 NTT Corp. All Rights Reserved. • Created by Aleksa Sarai (SUSE) • Umoci: Umoci modifies Open Container images • Unpacks and repacks OCI Image Spec archives (tar+gz and JSON) into/from OCI Runtime Spec bundles (directories) • "Pure"-Rootless and daemonless • Does not require setting up subuids/subgids (which require SUID binary) for unpacking archives that have multiple UIDs/GIDs • Uses `user.rootlesscontainers` xattr instead of `chown(2)` Umoci & Orca: the first rootless and daemonless image builder https://github.com/openSUSE/umoci https://github.com/cyphar/orca-build
  • 30. 30 Copyright©2018 NTT Corp. All Rights Reserved. • Orca: Umoci-based image builder with support for Dockerfile • Can be used with runROOTLESS for images that require multiple UIDs/GIDs (typically Debian/Ubuntu apt) • https://github.com/rootless-containers/runrootless • Emulates several system calls using `ptrace(2)` and `user.rootlesscontainers` xattr values (which are set by Umoci) • No SUID binary is required (but slow) • Multi-stage Dockerfile and caching are not supported at the moment • Planned to be integrated into Umoci • https://twitter.com/lordcyphar/status/987668301890207744 Umoci & Orca: the first rootless and daemonless image builder
  • 31. 31 Copyright©2018 NTT Corp. All Rights Reserved. • Created by Google • Kaniko itself needs to be executed in a container, but does not require `--privileged` • Execute `RUN` instructions within Kaniko's rootfs and namespaces • i.e. `RUN` instructions are executed without creating containers • Excludes kaniko itself's binary and configuration files on packing the rootfs archives • Seems inappropriate for malicious Dockerfiles due to lack of isolation (#106) kaniko: "containerless" rootless builder https://github.com/GoogleCloudPlatform/kaniko
  • 32. 32 Copyright©2018 NTT Corp. All Rights Reserved. • Bazel: Google's generic build system • Not specific to containers • `rules_docker` can build Docker images, but equivalent of `RUN` instruction is intentionally omitted due to poor reproducibility Non-Dockerfile based tools # https://github.com/bazelbuild/rules_docker#container_image container_image( name = "app", base = "@java_base//image", files = ["//java/com/example/app:Hello_deploy.jar"], cmd = ["Hello_deploy.jar"] )
  • 33. 33 Copyright©2018 NTT Corp. All Rights Reserved. • Source-to-Image: Red Hat OpenShift's build system • Application developers don't need to write any file for building images • S2I base images contain scripts for building applications in the language-specific way • e.g. `centos/python-35-centos7` for Python 3.5 • Previous versions depended on Docker, but recent version can produce Dockerfiles that can be built by other tools Non-Dockerfile based tools
  • 34. 34 Copyright©2018 NTT Corp. All Rights Reserved. • Metaparticle: library for cloud-native apps on Kubernetes • Supports .NET, Go, Java, JS, Python, Ruby, Rust • Hard to change the target repository without editing source codes • Or implementing a new library on top of Metaparticle • Also provides service-related features • e.g. sharding HTTP requests based on URL Non-Dockerfile based tools from metaparticle import Containerize @Containerize(package={'repo': 'foo/bar', ...) def main(): ...
  • 35. 35 Copyright©2018 NTT Corp. All Rights Reserved. • FTL • Similar to S2I but only for Node.js, Python, and PHP • Smith • Supports Oracle's "Microcontainer Manifest" • Ansible Container • Supports Ansible Playbook • README says "no longer under active development" Non-Dockerfile based tools
  • 36. 36 Copyright©2018 NTT Corp. All Rights Reserved. Comparison across Dockerfile-based tools Docker BuildKit img Buildah Orca kaniko Instruction cache Limited ✔ ✔ Parallelization ✔ ✔ Planned Distributed execution Planned Planned Daemonless As a library ✔ ✔ ✔ ✔ Rootless ✔ ✔ Planned ✔ ✔ Requires SUID binary for apt 1 1 2 3 1
  • 37. 37 Copyright©2018 NTT Corp. All Rights Reserved. Comparison across Dockerfile-based tools Docker BuildKit img Buildah Orca kaniko Instruction cache Limited ✔ ✔ Parallelization ✔ ✔ Planned Distributed execution Planned Planned Daemonless As a library ✔ ✔ ✔ ✔ Rootless ✔ ✔ Planned ✔ ✔ No SUID required but slow 1 1 2 3 2
  • 38. 38 Copyright©2018 NTT Corp. All Rights Reserved. Comparison across Dockerfile-based tools Docker BuildKit img Buildah Orca kaniko Instruction cache Limited ✔ ✔ Parallelization ✔ ✔ Planned Distributed execution Planned Planned Daemonless As a library ✔ ✔ ✔ ✔ Rootless ✔ ✔ Planned ✔ ✔ Executable in containers without `--privileged` but still has security concern 1 1 2 3 3
  • 39. 39 Copyright©2018 NTT Corp. All Rights Reserved. Benchmark Average time of Build #1 (5 times) Average time of Build #2 (5 times) Always without cache Some builders use cache Build #1 Build #2 Prune the state Put a dummy file Build #1 Build #2 Prune the state Put a dummy file ... Simulates trivial code change
  • 40. 40 Copyright©2018 NTT Corp. All Rights Reserved. • Benchmark script is available • https://github.com/AkihiroSuda/buildbench • Supported tools: Docker, Buildkit, img, Buildah, Kaniko • Everything is containerized • Builders (except Kaniko) are configured to use overlayfs • Tested on Travis CI (June 19, 2018) • Logs (contains version info and raw data): https://travis- ci.org/AkihiroSuda/buildbench/builds/393967682 • See also https://github.com/AkihiroSuda/buildbench/issues/5 • 2 bursted vCPUs, 7.5GB RAM Benchmark
  • 41. 41 Copyright©2018 NTT Corp. All Rights Reserved. Benchmark: examples/ex01 FROM alpine AS buildc RUN apk add --no-cache build-base RUN echo ... > hello.c COPY . /foo RUN gcc -o /a.out /hello.c FROM alpine AS buildgo RUN apk add --no-cache build-base RUN apk add --no-cache go RUN echo ... > hello.go RUN go build -o /a.out /hello.go FROM alpine COPY --from=buildc /a.out /hello1 COPY --from=buildgo /a.out /hello2 Only the cache for the next line SHOULD be invalidated on modification of the build ctx `apk add build-base` SHOULD NOT be executed twice
  • 42. 42 Copyright©2018 NTT Corp. All Rights Reserved. Benchmark result: examples/ex01 15.6s 7.9s 10.0s 15.3s 13.2s 1.2s 1.1s 1.9s 13.5s 13.1s Docker BuildKit img Buildah Kaniko #1 #2
  • 43. 43 Copyright©2018 NTT Corp. All Rights Reserved. • Dockerfile used for the development of Moby • Good example of complex DAG • 13 stages can be executed in parallel at maximum • Buildah and Kaniko don't support this DAG at the moment • `FROM base` results in attempt to pull `docker.io/library/base` Another benchmark: moby/moby golang:1.10.3 base criu registry docker-py swagger frozen-images runtime-dev tomlv vndr containerd proxy gometalinter dockercli tini dev runc
  • 44. 44 Copyright©2018 NTT Corp. All Rights Reserved. Benchmark result: moby/moby 351.8s 278.8s 447.1s 6.4s 1.9s 7.6s Docker BuildKit img #1 #2
  • 45. 45 Copyright©2018 NTT Corp. All Rights Reserved. • My recommendation is BuildKit, but it is not the "silver bullet" • disclosure: I'm a maintainer of BuildKit • Other tools are attractive as well • Language-specific builders, e.g. S2I • SUID-less rootless mode, e.g. Orca and Kaniko • Enterprise support, e.g. Buildah • Can we define the common interface for all of them? So.. which one is the best?
  • 46. 46 Copyright©2018 NTT Corp. All Rights Reserved. • https://github.com/containerbuilding/cbi • Defines "BuildJob" as a Kubernetes CRD • Supports several backends CBI: Container Builder Interface for Kubernetes CBI controller Docker BuildKit img Buildah GCB kubectl Session Manager cbictl Registry CBI CRD ("buildjob") CBI plugin API OCI Distribution Spec (Docker Registry API) Note: not an official CNCF/Kubernetes project
  • 47. 47 Copyright©2018 NTT Corp. All Rights Reserved. CBI: Container Builder Interface for Kubernetes apiVersion: cbi.containerbuilding.github.io/v1alpha1 kind: BuildJob metadata: name: ex0 spec: registry: target: example.com/foo/bar push: true language: dockerfile: {} context: git: url: git://github.com/foo/bar pluginSelector: plugin.name=buildkit Most plugins accept Dockerfile, but non-Dockerfile plugins are also supported. e.g. Source-to-Image The CBI controller converts "BuildJob" CRD objects into Kubernetes batch/v1 Job objects
  • 48. 48 Copyright©2018 NTT Corp. All Rights Reserved. CBI: Container Builder Interface for Kubernetes apiVersion: cbi.containerbuilding.github.io/v1alpha1 kind: BuildJob metadata: name: ex0 spec: registry: target: example.com/foo/bar push: true language: dockerfile: {} context: git: url: git://github.com/foo/bar pluginSelector: plugin.name=buildkit Also supports ConfigMap, HTTP, S3, SFTP, and even Dropbox.. (using Rclone) Registry and Git credentials can be provided as Kubernetes secret objects
  • 49. 49 Copyright©2018 NTT Corp. All Rights Reserved. • Supported plugins: • Docker • BuildKit • img • Buildah • kaniko • OpenShift Source-to-Image • Google Cloud Container Builder • Managed service for `docker build` • New plugin can be also added easily as a Kubernetes service CBI: Container Builder Interface for Kubernetes
  • 50. 50 Copyright©2018 NTT Corp. All Rights Reserved. • POC for Skaffold integration is available (GoogleContainerTools/skaffold#596) CBI: Container Builder Interface for Kubernetes apiVersion: skaffold/v1alpha2 kind: Config build: artifacts: - imageName: example.com/foo/bar deploy: kubectl: manifests: - k8s-pod.yaml profiles: - name: cbi build: cbi: {} Deploy a Kubernetes pod using the image By default the local Docker is used, but can be easily switched to CBI (`skaffold dev –p cbi`)
  • 51. 51 Copyright©2018 NTT Corp. All Rights Reserved. • My recommendation is BuildKit (disclosure: I'm a maintainer) • Will be integrated to Docker 18.06 experimentally (planned to be released by the end of this month) • But other tools are promising as well • Now is the time for standardization • https://github.com/containerbuilding/cbi Conclusion