When we understand topics like the optimization of Docker images and overall security measures, they can be adopted early on in the process, and provide benefits down the line. In this advanced Docker course, these topics and more are covered. The comprehensive chapters and detailed hands-on labs will introduce you to the concepts, and give you the opportunity to try them out. Upon course completion, you will be ready to implement what you’ve learned. For complete information on what is covered, view the detailed outline and training objectives below.
Skills Gained
- Explore the use of multi-stage Dockerfiles
- Deploy Multi-Container Applications with Docker Compose
- Get to know Docker bind, volume and tmpfs storage
- See when and how to inspect mounted volumes
- Introduce Docker Swarm & Kubernetes
- Recognize container orchestration operations
- See how containers are scheduled across available resources
- Learn when and how failed containers are replaced
- Understand Docker image security
- Discuss Docker daemon security
- Look at general hardening techniques for Docker
- Scan images for security vulnerabilities
- Learn how to reduce runtime image size
- Review Docker best practices
Who Can Benefit
This advanced Docker training course is designed to help software developers, DevOps personnel and platform engineers move beyond basic deployments and make use of advanced features available in Docker.
Prerequisites
Students registering for this course should have attended one of the Web Age courses listed below, or have equivalent experience and understanding of Docker basics. For the labs, students should be familiar with working at a terminal or command prompt.
- GL340 Docker Training
- WA3003 Docker and Kubernetes Fundamentals
Outline
Chapter 1 - Multi-Stage Docker Files
- Review: A Single Stage “docker build” command
- Docker Image - Size & Security
- Using a Multi-Stage Docker Build
- The Basic FROM Command
- Image References
- The COPY Command
- Multi-Stage Dockerfile Example
- Example using Ordinal Reference
- Multi-Stage Dockerfile for Build and Run
Chapter 2 - Docker Compose
- What is Docker Compose?
- Multi-Container Applications
- Compose Availability
- Features of Compose
- Common Use-Cases
- Directory Structure for a Compose Project
- compose.yml file
- Compose Command Types
- Start, Stop & Build Commands
- Service Runtime & Status Commands
- Miscellaneous Commands
- Getting Help on Compose Commands
Chapter 3 - Docker Storage
- Docker Storage
- Bind Mounts
- Use-Cases for Bind Mounts
- Volumes
- Use-Cases for Volumes
- Bind Mount "-v | --volume" Syntax
- Bind Mount "--mount" Syntax
- Bind Mount Examples
- Volume Mount "--mount" Syntax
- Volume Mount "-v | --volume" Syntax
- Volume Mount Examples
- Working with Volumes
- Inspecting a Mounted Volume
- Storing Data In-Memory - tmpfs mounts
- tmpfs Mount Examples
Chapter 4 - Orchestration
- Containerized Applications
- Container Orchestration: Features
- Scaling of Applications
- Networking of Applications
- Securing Applications
- Rolling out of Application Updates
- Scheduling of Containers across Available Resources
- Replacement of Failed Containers.
- Container Orchestration Systems
- Docker Swarm
- Docker Swarm Terminology
- Swarm Workflow
- Kubernetes
- Kubernetes Terminology
- Kubernetes Workflow
Chapter 5 - Docker Security
- Docker Security
- Securing the Docker Daemon
- Keep Docker Images up to date
- General Hardening Techniques for Docker
- Docker Image Security
- Managing Sensitive Information/Files
- Scan Images for Security Vulnerabilities
- Use Trusted Images
- Docker Container Security
- Don't Run as Root
- Install Only What's Needed
- Manage Resource Use
- OS Security Packages - AppArmour
- OS Security Packages - Seccomp
Chapter 6 - Docker Best Practices
- Docker Image Building Best Practices
- Use Custom Base Images
- Use Multi-Stage Builds to Reduce Runtime Image Size
- Multi-Stage Dockerfile Images: React App
- Multi-Stage Dockerfile Images: Spring Boot App
- Scan Built Images for Security Vulnerabilities
- Development Best Practices for Docker
- Use Docker Desktop for Development
- Keep Images Small
- Persisting Source Code Outside the Container
- Build Images along with Source Code
Lab Exercises
- Lab 01. Multi-stage Docker Files
- Lab 02. Docker Compose
- Lab 03. Docker Best Practices