The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
-
Upload
docker-inc -
Category
Technology
-
view
3.697 -
download
0
Transcript of The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
![Page 1: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/1.jpg)
The Dockerfile explosion
Gareth RushgroveSenior Software Engineer Puppet
![Page 2: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/2.jpg)
The Dockerfile explosion and the need for higher level tools
![Page 3: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/3.jpg)
IntroductionsWho am I and what am I doing here
![Page 4: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/4.jpg)
@garethr
![Page 5: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/5.jpg)
(without introducing more risk)
Gareth Rushgrove
![Page 6: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/6.jpg)
Built the Puppet Docker module
![Page 7: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/7.jpg)
Maintain the Puppet images
![Page 8: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/8.jpg)
Obsessed with metadata
![Page 9: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/9.jpg)
A brief history of Dockerfile
![Page 10: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/10.jpg)
Docker can build images automatically by reading the instructions from a DockerfileFrom the official docs at https://docs.docker.com/engine/reference/builder/
![Page 11: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/11.jpg)
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. From the official docs at https://docs.docker.com/engine/reference/builder/
![Page 12: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/12.jpg)
A simple Dockerfile
FROM ubuntu # Install vnc, xvfb in order to create a 'fake' display and firefox RUN apt-get update && apt-get install -y x11vnc xvfb firefox RUN mkdir ~/.vnc # Setup a password RUN x11vnc -storepasswd 1234 ~/.vnc/passwd # Autostart firefox (might not be the best way, but it does the trick) RUN bash -c 'echo "firefox" >> /.bashrc' EXPOSE 5900 CMD ["x11vnc", "-forever", "-usepw", "-create"]
![Page 13: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/13.jpg)
Dockerfile reference
![Page 14: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/14.jpg)
Commands you know
MAINTAINER <name> RUN <command> CMD ["executable","param1","param2"] EXPOSE <port> [<port>...] ADD <src>... <dest> ENV <key> <value> WORKDIR /path/to/workdir USER daemon VOLUME ["/data"] ENTRYPOINT ["executable", "param1", “param2"] COPY <src>... <dest>
![Page 15: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/15.jpg)
Commands you don’t know
ONBUILD [INSTRUCTION] STOPSIGNAL signal ARG <name>[=<default value>] LABEL <key>=<value> <key>=<value> <key>=<value> … HEALTHCHECK [OPTIONS] CMD command SHELL ["executable", "parameters"]
![Page 16: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/16.jpg)
Close ALL the issues
![Page 17: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/17.jpg)
Although this is not a definitive move, we temporarily won't accept more patches to the Dockerfile syntax for several reasons
![Page 18: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/18.jpg)
HEALTHCHECK coming in 1.12
![Page 19: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/19.jpg)
SHELL coming in 1.12
![Page 20: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/20.jpg)
Why Dockerfiles are great
![Page 21: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/21.jpg)
Simplicity
FROM scratch COPY hello / CMD ["/hello"]
![Page 22: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/22.jpg)
Multi-platform support
PS> Install-PackageProvider ContainerImage -Force PS> Install-ContainerImage -Name WindowsServerCore PS> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE windowsservercore 10.0.14300.1000 dbfee88ee9fd 7 weeks ago 9.344 GB
![Page 23: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/23.jpg)
Emerging tooling
![Page 24: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/24.jpg)
Linting
![Page 25: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/25.jpg)
Editor support
![Page 26: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/26.jpg)
Cross platform
![Page 27: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/27.jpg)
Why Dockerfiles are problematic
![Page 28: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/28.jpg)
Complexity
RUN apt-get update && \ apt-get install -y wget=1.17.1-1ubuntu1 && \ wget https://apt.example.com/release-"$UBUNTU_CODENAME".deb && \ dpkg -i release-"$UBUNTU_CODENAME".deb && \ rm release-"$UBUNTU_CODENAME".deb && \ apt-get update && \ apt-get install --no-install-recommends -y package=0.1.2 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/*
![Page 29: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/29.jpg)
Dockerfile proliferation
![Page 30: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/30.jpg)
language:Dockerfile maintainer
![Page 31: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/31.jpg)
138,062
![Page 32: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/32.jpg)
Only two approaches to reuse
![Page 33: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/33.jpg)
Inheritance
FROM debian:jessie
![Page 34: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/34.jpg)
![Page 35: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/35.jpg)
Dockerfile is not the source of truth for your image
![Page 36: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/36.jpg)
![Page 37: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/37.jpg)
The Dockerfile generally works beautifully for the class of problem for which it was designedNathan Leclair, Docker Inc
![Page 38: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/38.jpg)
The Dockerfile is a tool for creating images, but it is not the only weapon in your arsenalNathan Leclair, Docker Inc
![Page 39: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/39.jpg)
Putting the problems in context
![Page 40: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/40.jpg)
If we dockerize all of our applications how many Dockerfiles is that?
![Page 41: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/41.jpg)
If we build a complex hierarchy of Dockerfiles, how quickly can we trace/rebuild a specific image?
![Page 42: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/42.jpg)
As best-practices develops how can we refactor our Dockefiles with confidence?
![Page 43: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/43.jpg)
Are Dockerfiles best managed centrally or on a team-by-team basis?
![Page 44: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/44.jpg)
Some community ideas
![Page 45: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/45.jpg)
Generate Dockerfiles
![Page 46: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/46.jpg)
Build Dockerfiles with OCAML
![Page 47: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/47.jpg)
let base = let email = "[email protected]" in comment "Generated by OCaml Dockerfile" @@ from "ubuntu" ~tag:"trusty" @@ maintainer "Anil Madhavapeddy <%s>" email
let ocaml_ubuntu_image = base @@ run "apt-get -y -qq update" @@ run "apt-get -y install ocaml ocaml-native-compilers camlp4-extra opam" @@ onbuild (run "apt-get -y -qq update") ;;
OCAML example
![Page 48: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/48.jpg)
With Gradle
![Page 49: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/49.jpg)
Or Javascript
![Page 50: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/50.jpg)
Or Scala and SBT
![Page 51: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/51.jpg)
Or with Python
![Page 52: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/52.jpg)
No Dockerfile to be seen
![Page 53: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/53.jpg)
Docker Image Specification
![Page 54: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/54.jpg)
![Page 55: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/55.jpg)
Packer
![Page 56: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/56.jpg)
{ "builders":[{ "type": "docker", "image": "ubuntu", "export_path": "image.tar" }], "provisioners":[ { "type": "shell", "inline": ["apt-get -y update; apt-get install -y puppet-common"] }, { "type": "puppet-masterless",
Packer example
![Page 57: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/57.jpg)
Source-to-Image
![Page 58: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/58.jpg)
$ s2i create <image name> <destination directory> $ s2i build <source location> <builder image> [<tag>] [flags] $ s2i rebuild <image name> [<new-tag-name>] $ s2i usage <builder image> [flags]
$ s2i build ./sinatra-app openshift/ruby-20-centos7 ruby-app
s2i example
![Page 59: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/59.jpg)
Nix
![Page 60: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/60.jpg)
dockerTools.buildImage { name = "redis"; runAsRoot = '' #!${stdenv.shell} ${dockerTools.shadowSetup} groupadd -r redis useradd -r -g redis -d /data -M redis mkdir /data chown redis:redis /data '';
contents = [ redis ];
Nix example
![Page 61: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/61.jpg)
Habitat
![Page 62: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/62.jpg)
Expand on Dockerfile
![Page 63: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/63.jpg)
Rocker
![Page 64: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/64.jpg)
Rocker adds some crucial features that are missing from Dockerfile while keeping Docker’s original design
![Page 65: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/65.jpg)
FROM ubuntu:16.04 MAINTAINER Gareth Rushgrove "[email protected]"
ENV PUPPET_AGENT_VERSION="1.5.0" UBUNTU_CODENAME="xenial" PATH=/opt/puppetlabs/server/bin:/opt/puppetlabs/puppet/bin:/opt/puppetlabs/bin:$PATH
LABEL com.puppet.version="0.1.0" com.puppet.dockerfile="/Dockerfile" com.puppet.puppetfile="/Puppetfile" com.puppet.manifest="/manifests.init.pp"
MOUNT /opt/puppetlabs /etc/puppetlabs /root/.gem
RUN apt-get update && \ apt-get install -y wget=1.17.1-1ubuntu1 && \ wget https://apt.puppetlabs.com/puppetlabs-release-pc1-"$UBUNTU_CODENAME".deb && \ dpkg -i puppetlabs-release-pc1-"$UBUNTU_CODENAME".deb && \
Rockerfile example
![Page 66: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/66.jpg)
FROM ubuntu:16.04 MAINTAINER Gareth Rushgrove "[email protected]"
ENV PUPPET_AGENT_VERSION="1.5.0" UBUNTU_CODENAME="xenial" PATH=/opt/puppetlabs/server/bin:/opt/puppetlabs/puppet/bin:/opt/puppetlabs/bin:$PATH
LABEL com.puppet.version="0.1.0" com.puppet.dockerfile="/Dockerfile" com.puppet.puppetfile="/Puppetfile" com.puppet.manifest="/manifests.init.pp"
MOUNT /opt/puppetlabs /etc/puppetlabs /root/.gem
RUN apt-get update && \ apt-get install -y wget=1.17.1-1ubuntu1 && \ wget https://apt.puppetlabs.com/puppetlabs-release-pc1-"$UBUNTU_CODENAME".deb && \ dpkg -i puppetlabs-release-pc1-"$UBUNTU_CODENAME".deb && \
Includes new instructions
![Page 67: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/67.jpg)
rm -rf /var/lib/apt/lists/*
EXPOSE 80
CMD ["nginx"]
COPY Rockerfile /Dockerfile
TAG puppet/puppet-rocker-example
More new instructions
![Page 68: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/68.jpg)
Dockramp
![Page 69: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/69.jpg)
Dockerfile pre-processors
![Page 70: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/70.jpg)
FROM ubuntu:16.04 MAINTAINER Gareth Rushgrove "[email protected]"
ENV PUPPET_AGENT_VERSION="1.5.0" R10K_VERSION="2.2.2" \ UBUNTU_CODENAME="xenial"
PUPPET_INSTALL PUPPET_COPY_PUPPETFILE PUPPET_COPY_MANIFESTS PUPPET_RUN
EXPOSE 80
CMD ["nginx"]
Domain-specific extensions
![Page 71: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/71.jpg)
$ cat Dockerfile | dockerfilepp FROM ubuntu:16.04 MAINTAINER Gareth Rushgrove "[email protected]"
ENV PUPPET_AGENT_VERSION="1.5.0" R10K_VERSION="2.2.2" UBUNTU_CODENAME="xenial"
RUN apt-get update && \ apt-get install -y wget=1.17.1-1ubuntu1 && \ wget https://apt.puppetlabs.com/puppetlabs-release-pc1-"$UBUNTU_CODENAME".deb && \ dpkg -i puppetlabs-release-pc1-"$UBUNTU_CODENAME".deb && \ rm puppetlabs-release-pc1-"$UBUNTU_CODENAME".deb && \ apt-get update && \ apt-get install --no-install-recommends -y puppet-agent="$PUPPET_AGENT_VERSION"-1"$UBUNTU_CODENAME" && \
Simple expansion
![Page 72: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/72.jpg)
The futureSpeculation and things I’d like to see
![Page 73: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/73.jpg)
Formal specification for Dockerfile
![Page 74: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/74.jpg)
RUN, FROM, COPY, etc. as first class API primitives
![Page 75: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/75.jpg)
Opinionated workflow tooling around image build
![Page 76: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/76.jpg)
Shared libraries and support for pre-processors
![Page 77: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/77.jpg)
Complementary tools that take an organizational view of image building
![Page 78: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/78.jpg)
ConclusionsIf all you take away is…
![Page 79: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/79.jpg)
Dockerfile is a great starting point for many use cases
![Page 80: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/80.jpg)
But we will need better tools for managing many Dockerfiles
![Page 81: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/81.jpg)
And Dockerfile is just one interface to building images
![Page 82: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/82.jpg)
We’ll need different types of tools for different use cases
![Page 83: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/83.jpg)
Questions?And thanks for listening
![Page 84: The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove](https://reader033.fdocuments.net/reader033/viewer/2022051705/58a6afd41a28ab0a7a8b6ccd/html5/thumbnails/84.jpg)
Thank you!