SlideShare a Scribd company logo
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
Ad

More Related Content

What's hot (20)

containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能
Kohei Tokunaga
 
Rootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesRootless Containers & Unresolved issues
Rootless Containers & Unresolved issues
Akihiro Suda
 
Kubernetes and container security
Kubernetes and container securityKubernetes and container security
Kubernetes and container security
Volodymyr Shynkar
 
OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!
OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!
OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!
Kohei Tokunaga
 
コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)
コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)
コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)
NTT DATA Technology & Innovation
 
VMware が考えるコンテナと Kubernetes の世界
VMware が考えるコンテナと Kubernetes の世界VMware が考えるコンテナと Kubernetes の世界
VMware が考えるコンテナと Kubernetes の世界
Yuichi Tamagawa
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
DuckDuckGo
 
BuildKitによる高速でセキュアなイメージビルド
BuildKitによる高速でセキュアなイメージビルドBuildKitによる高速でセキュアなイメージビルド
BuildKitによる高速でセキュアなイメージビルド
Akihiro Suda
 
Fluentdのお勧めシステム構成パターン
Fluentdのお勧めシステム構成パターンFluentdのお勧めシステム構成パターン
Fluentdのお勧めシステム構成パターン
Kentaro Yoshida
 
Kubernetes networking
Kubernetes networkingKubernetes networking
Kubernetes networking
Sim Janghoon
 
Linux KVM環境におけるGPGPU活用最新動向
Linux KVM環境におけるGPGPU活用最新動向Linux KVM環境におけるGPGPU活用最新動向
Linux KVM環境におけるGPGPU活用最新動向
Taira Hajime
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101
LorisPack Project
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
Winton Winton
 
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動するStargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Kohei Tokunaga
 
【初心者向け】API を使ってクラウドの管理を自動化しよう
【初心者向け】API を使ってクラウドの管理を自動化しよう【初心者向け】API を使ってクラウドの管理を自動化しよう
【初心者向け】API を使ってクラウドの管理を自動化しよう
富士通クラウドテクノロジーズ株式会社
 
Hands-on Helm
Hands-on Helm Hands-on Helm
Hands-on Helm
Docker, Inc.
 
WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介
WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介
WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介
gree_tech
 
[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란 무엇인가? : Docker 기본 사용법
Docker란 무엇인가? : Docker 기본 사용법Docker란 무엇인가? : Docker 기본 사용법
Docker란 무엇인가? : Docker 기본 사용법
pyrasis
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
Akihiro Suda
 
containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能
Kohei Tokunaga
 
Rootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesRootless Containers & Unresolved issues
Rootless Containers & Unresolved issues
Akihiro Suda
 
Kubernetes and container security
Kubernetes and container securityKubernetes and container security
Kubernetes and container security
Volodymyr Shynkar
 
OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!
OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!
OCIv2?!軽量高速なイケてる次世代イメージ仕様の最新動向を抑えよう!
Kohei Tokunaga
 
コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)
コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)
コンテナセキュリティにおける権限制御(OCHaCafe5 #3 Kubernetes のセキュリティ 発表資料)
NTT DATA Technology & Innovation
 
VMware が考えるコンテナと Kubernetes の世界
VMware が考えるコンテナと Kubernetes の世界VMware が考えるコンテナと Kubernetes の世界
VMware が考えるコンテナと Kubernetes の世界
Yuichi Tamagawa
 
BuildKitによる高速でセキュアなイメージビルド
BuildKitによる高速でセキュアなイメージビルドBuildKitによる高速でセキュアなイメージビルド
BuildKitによる高速でセキュアなイメージビルド
Akihiro Suda
 
Fluentdのお勧めシステム構成パターン
Fluentdのお勧めシステム構成パターンFluentdのお勧めシステム構成パターン
Fluentdのお勧めシステム構成パターン
Kentaro Yoshida
 
Kubernetes networking
Kubernetes networkingKubernetes networking
Kubernetes networking
Sim Janghoon
 
Linux KVM環境におけるGPGPU活用最新動向
Linux KVM環境におけるGPGPU活用最新動向Linux KVM環境におけるGPGPU活用最新動向
Linux KVM環境におけるGPGPU活用最新動向
Taira Hajime
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101
LorisPack Project
 
Open shift 4 infra deep dive
Open shift 4    infra deep diveOpen shift 4    infra deep dive
Open shift 4 infra deep dive
Winton Winton
 
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動するStargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Stargz Snapshotter: イメージのpullを省略しcontainerdでコンテナを高速に起動する
Kohei Tokunaga
 
WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介
WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介
WFSにおけるCloud SpannerとGKEを中心としたGCP導入事例の紹介
gree_tech
 
[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란 무엇인가? : Docker 기본 사용법
Docker란 무엇인가? : Docker 기본 사용법Docker란 무엇인가? : Docker 기본 사용법
Docker란 무엇인가? : Docker 기본 사용법
pyrasis
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
Akihiro Suda
 

Similar to Comparing Next-Generation Container Image Building Tools (20)

Being a Moby maintainer
Being a Moby maintainerBeing a Moby maintainer
Being a Moby maintainer
Akihiro Suda
 
ISC HPCW talks
ISC HPCW talksISC HPCW talks
ISC HPCW talks
Akihiro 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 user
Akihiro Suda
 
Open collaboration in the Moby Project
Open collaboration in the Moby ProjectOpen collaboration in the Moby Project
Open collaboration in the Moby Project
Akihiro 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 BuildKit
Arnaud Porterie
 
Docker based-pipelines
Docker based-pipelinesDocker based-pipelines
Docker based-pipelines
DevOps.com
 
Docker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine EvolutionDocker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine Evolution
Phil 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 BuildKit
Akihiro 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 BuildKit
NTT Software Innovation Center
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power Systems
Cesar Maciel
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
corehard_by
 
LinuxKit Deep Dive
LinuxKit Deep DiveLinuxKit Deep Dive
LinuxKit Deep Dive
Docker, Inc.
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
Codefresh
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifei
dotCloud
 
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
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
Puneet Kumar Bhatia (MBA, ITIL V3 Certified)
 
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/CD
Nico Meisenzahl
 
Being a Moby maintainer
Being a Moby maintainerBeing a Moby maintainer
Being a Moby maintainer
Akihiro 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 user
Akihiro Suda
 
Open collaboration in the Moby Project
Open collaboration in the Moby ProjectOpen collaboration in the Moby Project
Open collaboration in the Moby Project
Akihiro 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 BuildKit
Arnaud Porterie
 
Docker based-pipelines
Docker based-pipelinesDocker based-pipelines
Docker based-pipelines
DevOps.com
 
Docker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine EvolutionDocker London Meetup: Docker Engine Evolution
Docker London Meetup: Docker Engine Evolution
Phil 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 BuildKit
Akihiro 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 BuildKit
NTT Software Innovation Center
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power Systems
Cesar Maciel
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
corehard_by
 
LinuxKit Deep Dive
LinuxKit Deep DiveLinuxKit Deep Dive
LinuxKit Deep Dive
Docker, Inc.
 
Docker based-Pipelines with Codefresh
Docker based-Pipelines with CodefreshDocker based-Pipelines with Codefresh
Docker based-Pipelines with Codefresh
Codefresh
 
Docker in pratice -chenyifei
Docker in pratice -chenyifeiDocker in pratice -chenyifei
Docker in pratice -chenyifei
dotCloud
 
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/CD
Nico Meisenzahl
 
Ad

More from Akihiro Suda (20)

20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
Akihiro Suda
 
20250403 [KubeCon EU Pavilion] containerd.pdf
20250403 [KubeCon EU Pavilion] containerd.pdf20250403 [KubeCon EU Pavilion] containerd.pdf
20250403 [KubeCon EU Pavilion] containerd.pdf
Akihiro Suda
 
20250402 [KubeCon EU Pavilion] Lima.pdf_
20250402 [KubeCon EU Pavilion] Lima.pdf_20250402 [KubeCon EU Pavilion] Lima.pdf_
20250402 [KubeCon EU Pavilion] Lima.pdf_
Akihiro Suda
 
20241115 [KubeCon NA Pavilion] Lima.pdf_
20241115 [KubeCon NA Pavilion] Lima.pdf_20241115 [KubeCon NA Pavilion] Lima.pdf_
20241115 [KubeCon NA Pavilion] Lima.pdf_
Akihiro Suda
 
20241113 [KubeCon NA Pavilion] containerd.pdf
20241113 [KubeCon NA Pavilion] containerd.pdf20241113 [KubeCon NA Pavilion] containerd.pdf
20241113 [KubeCon NA Pavilion] containerd.pdf
Akihiro Suda
 
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
Akihiro Suda
 
【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール
【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール
【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール
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.pdf
Akihiro Suda
 
20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdf20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdf
Akihiro 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 Podman
Akihiro Suda
 
[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilion[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilion
Akihiro Suda
 
[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilion[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilion
Akihiro Suda
 
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
Akihiro Suda
 
[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2
Akihiro 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 runtimes
Akihiro Suda
 
[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion
Akihiro Suda
 
[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilion[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilion
Akihiro Suda
 
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
20250403 [KubeCon EU] containerd - Project Update and Deep Dive.pdf
Akihiro Suda
 
20250403 [KubeCon EU Pavilion] containerd.pdf
20250403 [KubeCon EU Pavilion] containerd.pdf20250403 [KubeCon EU Pavilion] containerd.pdf
20250403 [KubeCon EU Pavilion] containerd.pdf
Akihiro Suda
 
20250402 [KubeCon EU Pavilion] Lima.pdf_
20250402 [KubeCon EU Pavilion] Lima.pdf_20250402 [KubeCon EU Pavilion] Lima.pdf_
20250402 [KubeCon EU Pavilion] Lima.pdf_
Akihiro Suda
 
20241115 [KubeCon NA Pavilion] Lima.pdf_
20241115 [KubeCon NA Pavilion] Lima.pdf_20241115 [KubeCon NA Pavilion] Lima.pdf_
20241115 [KubeCon NA Pavilion] Lima.pdf_
Akihiro Suda
 
20241113 [KubeCon NA Pavilion] containerd.pdf
20241113 [KubeCon NA Pavilion] containerd.pdf20241113 [KubeCon NA Pavilion] containerd.pdf
20241113 [KubeCon NA Pavilion] containerd.pdf
Akihiro Suda
 
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
【情報科学若手の会 (2024/09/14】なぜオープンソースソフトウェアにコントリビュートすべきなのか
Akihiro Suda
 
【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール
【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール
【Vuls祭り#10 (2024/08/20)】 VexLLM: LLMを用いたVEX自動生成ツール
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.pdf
Akihiro Suda
 
20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdf20240201 [HPC Containers] Rootless Containers.pdf
20240201 [HPC Containers] Rootless Containers.pdf
Akihiro 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 Podman
Akihiro Suda
 
[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilion[KubeConNA2023] Lima pavilion
[KubeConNA2023] Lima pavilion
Akihiro Suda
 
[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilion[KubeConNA2023] containerd pavilion
[KubeConNA2023] containerd pavilion
Akihiro Suda
 
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
[DockerConハイライト] OpenPubKeyによるイメージの署名と検証.pdf
Akihiro Suda
 
[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2[CNCF TAG-Runtime] Usernetes Gen2
[CNCF TAG-Runtime] Usernetes Gen2
Akihiro 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 runtimes
Akihiro Suda
 
[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion[KubeConEU2023] Lima pavilion
[KubeConEU2023] Lima pavilion
Akihiro Suda
 
[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilion[KubeConEU2023] containerd pavilion
[KubeConEU2023] containerd pavilion
Akihiro Suda
 
Ad

Recently uploaded (20)

Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Adobe Illustrator Crack | Free Download & Install Illustrator
Adobe Illustrator Crack | Free Download & Install IllustratorAdobe Illustrator Crack | Free Download & Install Illustrator
Adobe Illustrator Crack | Free Download & Install Illustrator
usmanhidray
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Salesforce Aged Complex Org Revitalization Process .pdf
Salesforce Aged Complex Org Revitalization Process .pdfSalesforce Aged Complex Org Revitalization Process .pdf
Salesforce Aged Complex Org Revitalization Process .pdf
SRINIVASARAO PUSULURI
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Adobe Photoshop CC 2025 Crack Full Serial Key With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key  With LatestAdobe Photoshop CC 2025 Crack Full Serial Key  With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key With Latest
usmanhidray
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Mastering OOP: Understanding the Four Core Pillars
Mastering OOP: Understanding the Four Core PillarsMastering OOP: Understanding the Four Core Pillars
Mastering OOP: Understanding the Four Core Pillars
Marcel David
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Xforce Keygen 64-bit AutoCAD 2025 Crack
Xforce Keygen 64-bit AutoCAD 2025  CrackXforce Keygen 64-bit AutoCAD 2025  Crack
Xforce Keygen 64-bit AutoCAD 2025 Crack
usmanhidray
 
Adobe Photoshop Lightroom CC 2025 Crack Latest Version
Adobe Photoshop Lightroom CC 2025 Crack Latest VersionAdobe Photoshop Lightroom CC 2025 Crack Latest Version
Adobe Photoshop Lightroom CC 2025 Crack Latest Version
usmanhidray
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Adobe Illustrator Crack | Free Download & Install Illustrator
Adobe Illustrator Crack | Free Download & Install IllustratorAdobe Illustrator Crack | Free Download & Install Illustrator
Adobe Illustrator Crack | Free Download & Install Illustrator
usmanhidray
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Salesforce Aged Complex Org Revitalization Process .pdf
Salesforce Aged Complex Org Revitalization Process .pdfSalesforce Aged Complex Org Revitalization Process .pdf
Salesforce Aged Complex Org Revitalization Process .pdf
SRINIVASARAO PUSULURI
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Adobe Photoshop CC 2025 Crack Full Serial Key With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key  With LatestAdobe Photoshop CC 2025 Crack Full Serial Key  With Latest
Adobe Photoshop CC 2025 Crack Full Serial Key With Latest
usmanhidray
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Mastering OOP: Understanding the Four Core Pillars
Mastering OOP: Understanding the Four Core PillarsMastering OOP: Understanding the Four Core Pillars
Mastering OOP: Understanding the Four Core Pillars
Marcel David
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Xforce Keygen 64-bit AutoCAD 2025 Crack
Xforce Keygen 64-bit AutoCAD 2025  CrackXforce Keygen 64-bit AutoCAD 2025  Crack
Xforce Keygen 64-bit AutoCAD 2025 Crack
usmanhidray
 
Adobe Photoshop Lightroom CC 2025 Crack Latest Version
Adobe Photoshop Lightroom CC 2025 Crack Latest VersionAdobe Photoshop Lightroom CC 2025 Crack Latest Version
Adobe Photoshop Lightroom CC 2025 Crack Latest Version
usmanhidray
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 

Comparing Next-Generation Container Image Building Tools

  • 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