SlideShare a Scribd company logo
More than Applications: (Ab)using Docker to Improve the Portability of Everything
@dexhorthy
@dexhorthy
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
FROM busybox:latest
VOLUMES [“/config”]
ADD . /shippedConfig
CMD cp /shippedConfig/* /config/
{...}
.
├── Dockerfile
└── my.cnf
$ docker run --name config test/config:dev
{...}
$ docker run --volumes-from config busybox 
/bin/sh -c “cat /config/my.cnf”
busybox
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl apt-transport-https
RUN mkdir -p /packages
# ...snip
COPY ./kubernetes.list /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install --download-only -y 
kubeadm kubelet kubectl kubernetes-cni 
-oDebug::NoLocking=1 -o=dir::cache=/packages/
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl apt-transport-https
RUN mkdir -p /packages
# ...snip
COPY ./kubernetes.list /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install --download-only -y 
kubeadm kubelet kubectl kubernetes-cni 
-oDebug::NoLocking=1 -o=dir::cache=/packages/
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl apt-transport-https
RUN mkdir -p /packages
# ...snip
COPY ./kubernetes.list /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install --download-only -y 
kubeadm kubelet kubectl kubernetes-cni 
-oDebug::NoLocking=1 -o=dir::cache=/packages/
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl apt-transport-https
RUN mkdir -p /packages
# ...snip
COPY ./kubernetes.list /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install --download-only -y 
kubeadm kubelet kubectl 
kubernetes-cni 
-oDebug::NoLocking=1 -o=dir::cache=/packages/
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl apt-transport-https
RUN mkdir -p /packages
# ...snip
COPY ./kubernetes.list /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install --download-only -y 
kubeadm kubelet kubectl kubernetes-cni 
-oDebug::NoLocking=1 -o=dir::cache=/packages/
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl apt-transport-https
RUN mkdir -p /packages
# ...snip
COPY ./kubernetes.list /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install --download-only -y 
kubeadm kubelet kubectl kubernetes-cni 
-oDebug::NoLocking=1 -o=dir::cache=/packages/
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl apt-transport-https
RUN mkdir -p /packages
# ...snip
COPY ./kubernetes.list /etc/apt/sources.list.d/kubernetes.list
RUN apt-get update
RUN apt-get install --download-only -y 
kubeadm kubelet kubectl kubernetes-cni 
-oDebug::NoLocking=1 -o=dir::cache=/packages/
FROM busybox:latest
COPY --from=0 /packages /packages
CMD cp -r /packages/* /out/
$ docker run -v ${PWD}:/out 
gcr.io/replicated-equip/k8s-packages:ubuntu-1604-v1.9.3
$ sudo dpkg -i archives/*.deb
$ ls -l archives
total 57304
-rw-r--r-- 1 root root 79416 Apr 17 14:12 ebtables_2.0.10.4-3.4ubuntu2_amd64.deb
-rw-r--r-- 1 root root 97500 Apr 17 14:12 ethtool_1%3a4.5-1_amd64.deb
-rw-r--r-- 1 root root 522092 Apr 17 14:12 iproute2_4.3.0-1ubuntu3.16.04.3_amd64.deb
-rw-r--r-- 1 root root 265782 Apr 17 14:12 iptables_1.6.0-2ubuntu3_amd64.deb
-rw-r--r-- 1 root root 88648 Apr 17 14:12 kmod_22-1ubuntu5_amd64.deb
-rw-r--r-- 1 root root 20091708 Apr 17 14:12 kubeadm_1.9.3-00_amd64.deb
-rw-r--r-- 1 root root 10539730 Apr 17 14:12 kubectl_1.9.3-00_amd64.deb
-rw-r--r-- 1 root root 20454776 Apr 17 14:12 kubelet_1.9.3-00_amd64.deb
-rw-r--r-- 1 root root 5909628 Apr 17 14:12 kubernetes-cni_0.6.0-00_amd64.deb
-rw-r--r-- 1 root root 24248 Apr 17 14:12 libatm1_1%3a2.5.1-1.5_amd64.deb
-rw-r--r-- 1 root root 27230 Apr 17 14:12 libxtables11_1.6.0-2ubuntu3_amd64.deb
drwx------ 2 root root 4096 Apr 17 14:12 partial
-rw-r--r-- 1 root root 321050 Apr 17 14:12 socat_1.7.3.1-1_amd64.deb
-rw-r--r-- 1 root root 22988 Apr 17 14:12 tcpd_7.6.q-25_amd64.deb
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
linuxit
More than Applications: (Ab)using Docker to Improve the Portability of Everything
linuxkit pkg build
kube-dns
kube-proxy
etcd
kube-apiserver
...
docker save
docker save
docker save
docker save
docker save
k8s-images
kube-dns.tar
kube-proxy.tar
etcd.tar
kube-apiserver.tar
...
gcr.io/google_containers/kube-proxy-amd64:v1.9.3@sha256:19277373ca983423c3ff82dbb14f079a2f37b84926a4c569375314fa39a4ee96
gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.7@sha256:f80f5f9328107dc516d67f7b70054354b9367d31d4946a3bffd3383d83d7efe8
gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.7@sha256:f5bddc71efe905f4e4b96f3ca346414be6d733610c1525b98fff808f93966680
gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.7@sha256:6cfb9f9c2756979013dbd3074e852c2d8ac99652570c5d17d152e0c0eb3321d6
gcr.io/google_containers/pause-amd64:3.0@sha256:163ac025575b775d1c0f9bf0bdd0f086883171eb475b5068e7defa4ca9e76516
weaveworks/weave-kube:2.2.0@sha256:a3f69d589e0b27b95070526e70de176811a3d2c6d9f07cc40c38c5fa7c026ff5
weaveworks/weave-npc:2.2.0@sha256:1d85c63e8b4cd433363d5527fdae263069d118308521490a9ea2d4b00b484a5e
brndnmtthws/nginx-echo-headers:latest@sha256:32dc6a6f408e8315622ee9fb8b4a6342d88df7d912f2075bb52929a16b33585a
gcr.io/google_containers/kube-apiserver-amd64:v1.9.3@sha256:a5382344aa373a90bc87d3baa4eda5402507e8df5b8bfbbad392c4fff715f043
gcr.io/google_containers/kube-controller-manager-amd64:v1.9.3@sha256:3ac295ae3e78af5c9f88164ae95097c2d7af03caddf067cb35599769d0b7251e
gcr.io/google_containers/kube-scheduler-amd64:v1.9.3@sha256:2c17e637c8e4f9202300bd5fc26bc98a7099f49559ca0a8921cf692ffd4a1675
gcr.io/google_containers/etcd-amd64:3.1.11@sha256:54889c08665d241e321ca5ce976b2df0f766794b698d53faf6b7dacb95316680
gcr.io/google_containers/kube-proxy-amd64:v1.9.3
@sha256:19277373ca983423c3ff82dbb14f079a2f37b84926a
4c569375314fa39a4ee96
FROM linuxkit/alpine:cba395fbc278daee841106801aba1e1bd7e0f2f7 AS build
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out 
alpine-baselayout 
busybox
# Remove apk residuals. We have a read-only rootfs, so apk is of no use.
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
FROM scratch
WORKDIR /
COPY --from=build /out /
COPY --from=docker:17.06.0-ce /usr/local/bin/docker /usr/local/bin/docker
COPY dl/*.tar /images/
ENTRYPOINT [ "/bin/sh", "-c" ]
CMD [ "for image in /images/*.tar ; do docker image load -i $image && rm -f $image ; done" ]
FROM scratch
WORKDIR /
COPY --from=build /out /
COPY --from=docker:17.06.0-ce /usr/local/bin/docker /usr/local/bin/docker
COPY dl/*.tar /images/
ENTRYPOINT [ "/bin/sh", "-c" ]
CMD [ "for image in /images/*.tar ; do docker image load -i $image && rm -f $image ; done" ]
FROM scratch
WORKDIR /
COPY --from=build /out /
COPY --from=docker:17.06.0-ce /usr/local/bin/docker /usr/local/bin/docker
COPY dl/*.tar /images/
ENTRYPOINT [ "/bin/sh", "-c" ]
CMD [ "for image in /images/*.tar ; do docker image load -i $image && rm -f $image ; done" ]
kube-dns
kube-proxy
etcd
kube-apiserver
...
docker load
docker load
docker load
docker load
docker load
k8s-images
kube-dns.tar
kube-proxy.tar
etcd.tar
kube-apiserver.tar
...
$ docker run -v /var/run/docker.sock:/var/run/docker.sock 
gcr.io/replicated-equip/k8s-containers:v1.9.3
$ docker images
gcr.io/google_containers/kube-apiserver-amd64 v1.9.3 360d55f91cbf
gcr.io/google_containers/kube-controller-manager-amd64 v1.9.3 83dbda6ee810
gcr.io/google_containers/kube-proxy-amd64 latest 35fdc6da5fd8
gcr.io/google_containers/kube-proxy-amd64 v1.9.3 35fdc6da5fd8
gcr.io/google_containers/kube-scheduler-amd64 v1.9.3 d3534b539b76
weaveworks/weave-npc 2.2.0 765b48853ac0
weaveworks/weave-kube 2.2.0 222ab9e78a83
gcr.io/google_containers/etcd-amd64 3.1.11 59d36f27cceb
gcr.io/google_containers/k8s-dns-sidecar-amd64 1.14.7 db76ee297b85
gcr.io/google_containers/k8s-dns-kube-dns-amd64 1.14.7 5d049a8c4eec
gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64 1.14.7 5feec37454f4
gcr.io/google_containers/pause-amd64 3.0 99e59f495ffa
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything
More than Applications: (Ab)using Docker to Improve the Portability of Everything

More Related Content

PDF
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneru
PDF
Docker perl build
PPTX
2012 coscup - Build your PHP application on Heroku
PDF
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
ODP
Capifony. Minsk PHP MeetUp #11
PDF
Docker & FieldAware
PPTX
Deployment with Fabric
PDF
Conan a C/C++ Package Manager
Jak se ^bonami\.(cz|pl|sk)$ vešlo do kontejneru
Docker perl build
2012 coscup - Build your PHP application on Heroku
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
Capifony. Minsk PHP MeetUp #11
Docker & FieldAware
Deployment with Fabric
Conan a C/C++ Package Manager

What's hot (20)

PDF
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
PPT
Dev8d 2011-pipe2 py
PDF
Pursue container architecture with mincs
PDF
Towards the perfect Drupal Dev Machine
PDF
Confitura 2018 — Apache Beam — Promyk Nadziei Data Engineera
PDF
Docker: ao vivo e a cores
ODP
Fabric Fast & Furious edition
PPT
Watch Me Install Alfresco
PPTX
Infrastructure as Code: Introduction to Terraform
PDF
Infrastructure as Code with Terraform
PDF
Conan.io - The C/C++ package manager for Developers
PPTX
Docker & Kubernetes
PDF
Plone and docker
PDF
Koha installation BALID
DOCX
Dockerfish-Tutorial
PDF
Puppet Camp Ghent 2013
PDF
Containerize spring boot application with docker
PDF
Quickly extending into testing with docker
PDF
Cloud focker を試してみた public
PDF
Docker and plone
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
Dev8d 2011-pipe2 py
Pursue container architecture with mincs
Towards the perfect Drupal Dev Machine
Confitura 2018 — Apache Beam — Promyk Nadziei Data Engineera
Docker: ao vivo e a cores
Fabric Fast & Furious edition
Watch Me Install Alfresco
Infrastructure as Code: Introduction to Terraform
Infrastructure as Code with Terraform
Conan.io - The C/C++ package manager for Developers
Docker & Kubernetes
Plone and docker
Koha installation BALID
Dockerfish-Tutorial
Puppet Camp Ghent 2013
Containerize spring boot application with docker
Quickly extending into testing with docker
Cloud focker を試してみた public
Docker and plone
Ad

Similar to More than Applications: (Ab)using Docker to Improve the Portability of Everything (20)

PDF
Docker command
PDF
Using Nix and Docker as automated deployment solutions
PDF
Использование Docker в CI / Александр Акбашев (HERE Technologies)
PDF
Builder and BuildKit
PDF
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
PDF
Challenges of container configuration
PDF
kubernetes practice
PDF
DCEU 18: Tips and Tricks of the Docker Captains
PDF
How to burn your GPU with CUDA9.1
PDF
Bundling Packages and Deploying Applications with RPM
PPTX
Real World Experience of Running Docker in Development and Production
PPTX
Docker practice
PDF
DCSF19 Dockerfile Best Practices
PDF
青云CoreOS虚拟机部署kubernetes
PDF
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
PDF
Develop and deploy haskell with docker
PDF
Streamline your development environment with docker
PDF
Hands-On Session Docker
PPTX
Running Docker in Development & Production (DevSum 2015)
PDF
Kubernetes Multinode configuration on Ubuntu
Docker command
Using Nix and Docker as automated deployment solutions
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Builder and BuildKit
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...
Challenges of container configuration
kubernetes practice
DCEU 18: Tips and Tricks of the Docker Captains
How to burn your GPU with CUDA9.1
Bundling Packages and Deploying Applications with RPM
Real World Experience of Running Docker in Development and Production
Docker practice
DCSF19 Dockerfile Best Practices
青云CoreOS虚拟机部署kubernetes
JDO 2019: Tips and Tricks from Docker Captain - Łukasz Lach
Develop and deploy haskell with docker
Streamline your development environment with docker
Hands-On Session Docker
Running Docker in Development & Production (DevSum 2015)
Kubernetes Multinode configuration on Ubuntu
Ad

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
ai tools demonstartion for schools and inter college
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
AI in Product Development-omnex systems
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
medical staffing services at VALiNTRY
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Introduction to Artificial Intelligence
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
System and Network Administration Chapter 2
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
history of c programming in notes for students .pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Navsoft: AI-Powered Business Solutions & Custom Software Development
ai tools demonstartion for schools and inter college
VVF-Customer-Presentation2025-Ver1.9.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
AI in Product Development-omnex systems
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
medical staffing services at VALiNTRY
Reimagine Home Health with the Power of Agentic AI​
Wondershare Filmora 15 Crack With Activation Key [2025
PTS Company Brochure 2025 (1).pdf.......
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Introduction to Artificial Intelligence
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
How Creative Agencies Leverage Project Management Software.pdf
System and Network Administration Chapter 2
Adobe Illustrator 28.6 Crack My Vision of Vector Design
history of c programming in notes for students .pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 41

More than Applications: (Ab)using Docker to Improve the Portability of Everything