DevOps

Level: Intermediate

Mastering Docker: From Basics to Advanced Deployment

2 days

Welcome to “Mastering Docker: From Basics to Advanced Deployment”! This comprehensive course is designed to equip both system administrators and developers with the knowledge and skills needed to effectively use Docker in modern software development and deployment environments.

Docker has revolutionised the way we build, ship, and run applications. By providing a standardised unit of software that packages up code and all its dependencies, Docker ensures that an application runs quickly and reliably from one computing environment to another. Whether you’re a system administrator tasked with managing Docker hosts or a developer looking to streamline your workflow, this course will provide you with the tools and understanding to leverage Docker’s full potential.

Throughout this course, you’ll learn everything from the fundamental concepts of containerisation to advanced topics like custom image creation, complex networking setups, and optimized Docker builds. We’ll cover best practices for creating efficient Docker images and managing containers effectively.

By the end of this course, you’ll be able to confidently create and manage Docker containers, design efficient Docker networks, handle data persistence with volumes, and orchestrate multi-container applications using Docker Compose. You’ll also gain hands-on experience in optimizing Docker images and implementing best practices for container management.

Course Structure

This course is designed to be delivered over two days, covering all essential aspects of Docker from containers and images to networking, storage, and Docker Compose. For teams and individuals who want to dive deeper into Docker image building and optimization, we offer an optional third day that focuses entirely on Dockerfile creation, multi-stage builds, and build optimization techniques.

The core two-day course (Modules 0-7) provides you with everything you need to work effectively with Docker in your daily operations. The optional third day (Modules 10-15) is perfect for developers and DevOps engineers who need to create and optimize their own Docker images, offering advanced techniques for efficient image building and size optimization.

Learning Outcomes

Upon completion of this course, participants will be able to:

  • Understand the core concepts of containerisation and Docker’s architecture
  • Install, configure, and manage Docker on various operating systems
  • Create, run, and manage Docker containers efficiently
  • Build custom Docker images using Dockerfile and best practices
  • Implement Docker networking configurations for container communication
  • Manage persistent data using Docker volumes
  • Orchestrate multi-container applications with Docker Compose
  • Optimize Docker images and implement build best practices
  • Troubleshoot common Docker issues and optimize container performance

Course Outline

Module 0: Course Setup

  • Environment setup and prerequisites
  • Installing necessary tools and software
  • Verifying the setup

Module 1: Introduction to Docker

  • Understanding containerisation and its benefits
  • Docker architecture overview
  • Comparing containers vs. virtual machines
  • Docker’s role in modern software development

Module 2: Working with Containers

  • Running your first container
  • Basic container operations
  • Container lifecycle management
  • Working with container resources

Module 3: Docker Images

  • Understanding Docker images and layers
  • Working with Docker Hub
  • Image management fundamentals
  • Image tagging and versioning

Module 4: Docker Networking

  • Docker network types
  • Creating and managing networks
  • Inter-container communication
  • Port mapping and exposure
  • Network troubleshooting

Module 5: Docker Storage

  • Understanding Docker storage options
  • Working with volumes
  • Bind mounts and tmpfs
  • Data persistence strategies

Module 6: Docker Compose

  • Introduction to Docker Compose
  • Writing docker-compose.yml files
  • Managing multi-container applications
  • Environment variables and configuration
  • Compose commands and lifecycle

Module 7: Container Management

  • Advanced container operations
  • Resource constraints and limits
  • Container monitoring and logging
  • Best practices for container management

Optional Day 3 Modules

This course is designed to be delivered over 2 days, but if you are looking for a more comprehensive course to include build optimisation and multi-stage builds, you can add the following modules to the course:

Module 10: Docker Build Fundamentals

  • Introduction to Dockerfile
  • Basic build commands
  • Building your first image

Module 11: CMD and ENTRYPOINT

  • Understanding CMD vs ENTRYPOINT
  • Configuring container startup behavior
  • Best practices for entry points

Module 12: ENV and WORKDIR

  • Environment variables in Docker
  • Working directory configuration
  • Build-time variables

Module 13: Build Optimization

  • Layer optimization techniques
  • Reducing image size
  • Build performance improvements

Module 14: Using Dive Tool

  • Introduction to Dive
  • Analyzing image layers
  • Identifying optimization opportunities

Module 15: Multi-stage Builds

  • Understanding multi-stage builds
  • Implementing efficient build patterns
  • Reducing final image size
  • Production-ready images

Appendix A: Installation Guide

  • Detailed installation instructions
  • Platform-specific considerations
  • Troubleshooting common installation issues