Course Overview
Master container technologies like Docker, Podman, and CRI-O within the context of Kubernetes clusters. This course focuses on Kubernetes-specific implementations, omitting standalone features like networking, persistence, and resource/health management found in traditional Docker/Podman environments. Perfect for those using containers in Kubernetes.
Course Prerequisites
Students should be familiar with general principles of software development. Some basic knowledge of software systems such as databases, web servers, etc is also required. Not a requirement, but having basic linux operating skills is very helpful. No prior knowledge of docker is required.
Outline
Note: This masterclass is tailored for individuals leveraging container technologies specifically within Kubernetes. If you're seeking a comprehensive Docker/Podman course, we recommend our DOCKER-CORE offering. There, you'll dive into essential features for running Docker/Podman independently, including networking, persistence, resource/health management, Compose, and Podman pods.
Introduction
- Introduction to Containers
- Docker history
- overview of Podman
- OCI Container technologies (Docker, Moby,Podman, Buildah)
- What problems do containers solve
- Benefits of using containers
- Understand container isolation
- Containers vs virtual machines
- How containers facilitates devops
- Installing Docker CE or Podman
Containers
- Deeper dive into container isolation
- Introduce Images and the relation with containers
- Linux Namespaces (PID, UTS, NET, etc) and containers
- Understand ephemeral containers
- Discuss the various states of a container (Created, Up, Paused, …)
- Running and Stopping containers
- Run detached containers in the background
- Managing containers (listing, removing, inspecting, killing, pausing, restarting)
- Discuss go-templates for inspecting containers
- Interactive containers
- Executing commands in running containers
- Copying files and directories to and from containers
- How to Expose (and map) network ports
- Introduce use of linux namespaces (e.g, user namespaces in podman)
- Troubleshooting containers
- getting information (logs, exit codes, oom kill, …)
- debugging containers
- Using systemd
Container Images (OCI)
- Introduce Container repositories (Docker Hub, Quay.io)
- Appreciate that image are immutable
- Managing images (listing, removing, inspecting)
- Fully understand image layers (including intermediate)
- List different ways to create images
- Container images FROM scratch
- Creating base images (e.g., Debian)
- Building an image from Containers
- Using Multi-stage builds
Creating and Using Container Files
- Building images using different tools (docker, buildkit, buildah)
- Understand the syntax of a
Containerfile
/Dockerfile
- Choosing and specifying a base image
- Adding meta-data
- Understand the build process
- Understand the build context
- Introduce dockerignore files
- How to optimise reusing of layers
- Running commands effectively
- Understand shell-form and exec-form when running commands
- Keeping your builds deterministic
- Copying files and directories
- improve performance using COPY --link
- Difference between COPY and ADD
- Understand the working directory (and changing it)
- Defining network ports
- Changing the container's environment
- Building executable containers
- Understand how to use ENTRYPOINT and/or CMD
- Best practices in creating images
- Using traditional build containers
- Using multi-stage build files
- using mounts in dockerfiles (e.g., secrets, *ssh, …)
- speed-up builds using cache mounts