Course Overview
For companies that have their sights set firmly on the future, Container technologies such as Docker and Podman are the next step up that their teams need to take. With a solid grasp of the benefits Containers has to offer, your department will be at the forefront, delivering outstanding efficiency and smooth, reliable performances.
Book a course with us and your team will be led each step of the way, by one of our experienced and very talented instructors. They will be on hand to answer any queries your team has, and this level of attention is a given, whether your team gets to grips with Containers as an online course, or an onsite experience.
During the course students can either use docker or podman
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
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 images 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
Data Volumes
- Understand the need for data volumes
- Introduce the volume architecture
- Creating and inspecting volumes
- Sharing data
- Using the volume CLI
- Use mount binding
- Binding to the local file-system
- Binding to named volumes
- Mounting tmpfs
- Using legacy Volume Containers
- Mounting options (read-only, selinux labels, …)
- Using NFS
- Using volumes for databases (Postgres, MongoDB, …)
- Working with Podman Secrets
- Using Podman unshare
Networking
- Understand container's networking architecture
- List different network types (bridge, host, none, overlay and macvlan)
- Introduce the Network CLI
- Managing networks (listing, inspecting, …)
- Understand the problems of the default bridge network
- Discuss and use the deprecated container links
- Creating a custom bridge networks
- Connecting containers to a network
- Use of DNS inside a custom network
- Registering additional domain names for a container
- Connecting to multiple networks
- Managing container's /etc/hosts
Container Management
- Container restart policies
- Constrain container's memory
- Constrain container's CPU resources
- Set up a self-hosted repository
- Understand the relation between image names and repository
- Pulling and Pushing images
- Understand container logging
- Log configuration
- Using different logging drivers
- Setup fluentd/elasticsearch with kibana
- Setup cAdvisor and Prometheus
Docker Compose
- Introduce docker-compose
- Using podman with Compose
- introduction to the yaml syntax
- Writing compose yaml files
- configuring containers inside compose
- Understand networks in Compose
- Setting up links between services
- configuring volumes inside compose
- Setting up a CI/CD-Pipeline using containerised GitLab and Jenkins
Pods (Podman)
- Introduce kubernetes Pod objects
- Explore imperative pod definitions
- Appreciate declarative yaml definitions
- Add containers to pods
- Understand volume and mounts in pods
- Introduce ConfigMap for application configuration
- Map configmap data to environment variables and volume mounts
- Use kubernetes Secrets for Podman Secrets