The Docker & Container Ecosystem 101

A presentation at DockerCon Live 2021 in May 2021 in by Melissa McKay

Slide 1

Slide 1

The Docker & Container Ecosystem 101

Slide 2

Slide 2

Agenda ● Introductions ● Why Containers? ● History Lesson ● The Docker Ecosystem ● Containers Explained ● What Now?

Slide 3

Slide 3

Melissa McKay Developer Advocate, JFrog JAVA CHAMPION DOCKER CAPTAIN @melissajmckay https://jfrog.com/shownotes

Slide 4

Slide 4

SO MANY QUESTIONS!!! ● What is DOCKER? ● Is this something I have to install? ● How do I build this thing? ● What’s a CONTAINER? ● What’s an IMAGE? ● How do I launch this?

Slide 5

Slide 5

WHY Containers?

Slide 6

Slide 6

What Problem are You Trying to Solve? 1. Really? You’re using Java 11? 2. My workstation is a Macbook Pro 3. There’s a bug in production 4. It works on my machine… ONLY on my machine 5. We just hired three new developers 6. My service is super popular!

Slide 7

Slide 7

Container Use Cases Addressing real concerns Dev Environments. Test Environments. Prod Environments. Decrease ramp up time and increase productivity with consistent and predictable environments. Better simulation of production using tools like Testcontainers for more efficient and effective integration testing. Run applications anywhere — bare metal, VMs, different Linux distributions — flexibility with production resources and infrastructure.

Slide 8

Slide 8

History Lesson

Slide 9

Slide 9

“Those who fail to learn from history are condemned to repeat it.” - Winston Churchill (George Santayana paraphrased) “We are not makers of history. We are made by history.” - Martin Luther King, Jr.

Slide 10

Slide 10

Timing is Everything ● 1979/1982: chroot 2000: FreeBSD jail ● 2004: Solaris Zones / snapshots ● 2006: Google Process Containers / cgroups ● 2008: IBM LinuX Containers (LXC) ● 2013: Docker / Google LMCTFY (open source!) ● 2014: Docker trades LXC for libcontainer ● …. more stuff 2014 Java 8 2011 Java 7

Slide 11

Slide 11

Open Container Initiative (OCI) Established June 22, 2015 “Participants include, basically, everyone from A to V in the tech industry. This is 20+ organizations including Apcera, AWS, Cisco, CoreOS, Docker, EMC, Fujitsu Limited , Google, Goldman Sachs, HP, Huawei, IBM, Intel, Joyent, Pivotal, the Linux Foundation, Mesosphere, Microsoft, Rancher Labs, Red Hat, and VMware.”[1] 1. Golub, Ben. “Docker and Broad Industry Coalition Unite to Create Open Container Project.” docker blog, Jun 22. 2015, docker.com/blog/open-container-project-foundation/.

Slide 12

Slide 12

OCI Activities opencontainers.org ● June 2015: OCI established ○ OCI Runtime Specification (runtime-spec) ○ OCI Image Specification (image-spec) ○ OCI Distribution Specification (distribution-spec) ● July 2017: Runtime and Image specs released (v1.0) ● May 4 2021: Distribution spec released (v1.0)

Slide 13

Slide 13

Cloud Native Computing Foundation (CNCF) Established July 21, 2015 “The Cloud Native Computing Foundation (CNCF) hosts critical components of the global technology infrastructure. CNCF brings together the world’s top developers, end users, and vendors and runs the largest open source developer conferences. CNCF is part of the nonprofit Linux Foundation.”[2] 2. “Who we are.” Cloud Native Computing Foundation, Accessed May 20. 2021, https://www.cncf.io/about/who-we-are/.

Slide 14

Slide 14

CNCF Activities cncf.io ● July 21, 2015: Kubernetes v1.0 released! ● Dec 13, 2016: Kubernetes v1.5 released! ○ ● Container Runtime Interface (CRI) Mar, 2017: Docker contributes CRI compatible containerd to CNCF

Slide 15

Slide 15

Docker Anatomy

Slide 16

Slide 16

All the things…. ● Define a container (an image format) ● Build an image of a container ● Manage container images ● Distribute/share container images ● Create a container environment ● Launch/run a container (a container runtime) ● Manage the lifecycle of container instances

Slide 17

Slide 17

Container Runtimes. ● ● Low Level Runtimes ○ runC (Go, used to be libcontainer, Docker) ○ crun (C, RedHat) ○ railcar (Rust, Oracle) <- archived High Level Runtimes (implementations of CRI to use OCI runtimes) ○ containerd ○ cri-o

Slide 18

Slide 18

Kubernetes Deprecates Docker Runtime (after v1.20) Docker (the whole package) does not implement the CRI, but containerd does! Docker has used containerd as its runtime since v1.11 https://kubernetes.io/blog/2020/12/02/dont-panic-ku bernetes-and-docker/

Slide 19

Slide 19

Containers Explained

Slide 20

Slide 20

Terminology 101 CONTAINER: a running instance on your machine CONTAINER IMAGE: an immutable, executable binary used to create a container (a blueprint) DOCKERFILE: the file containing the image build instructions IMAGE TAG: indicates the version of the image CONTAINER REGISTRY: a library of container repositories and images (e.g. Docker Hub) IMAGE REPOSITORY: stores all versions/tags of an image

Slide 21

Slide 21

What Now?

Slide 22

Slide 22

HELPFUL LINKS ● Download Docker Desktop! ● docs.docker.com ● cncf.io ● opencontainers.org

Slide 23

Slide 23

THANK YOU! Q&A