The Docker & Container Ecosystem 101
A presentation at DockerCon Live 2021 in May 2021 in by Melissa McKay
The Docker & Container Ecosystem 101
Agenda ● Introductions ● Why Containers? ● History Lesson ● The Docker Ecosystem ● Containers Explained ● What Now?
Melissa McKay Developer Advocate, JFrog JAVA CHAMPION DOCKER CAPTAIN @melissajmckay https://jfrog.com/shownotes
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?
WHY Containers?
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!
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.
History Lesson
“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.
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
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/.
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)
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/.
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
Docker Anatomy
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
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
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/
Containers Explained
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
What Now?
HELPFUL LINKS ● Download Docker Desktop! ● docs.docker.com ● cncf.io ● opencontainers.org
THANK YOU! Q&A