Leanpub Header

Skip to main content

Painless Docker

Unlock the Power of Docker and its Ecosystem

Painless Docker is a practical guide to mastering Docker & its ecosystem with real-world examples.

It is a detailed step-by-step guide to create, deploy, optimize, secure, debug, log, orchestrate & monitor Docker, Docker clusters & modern Docker-based microservices from development to production.

This book is available in multiple packages!

Pick Your Package

Buying multiple copies for your team? See below for a discount!

PDF
EPUB
WEB
706
Readers
317
Pages
61,897Words
About

About

About the Book

Docker is a powerful tool, but learning how to use it effectively can be time-consuming. If you are used to the old paradigms of development and deployment, this paradigm shift to Docker's containerization can be challenging, as it introduces completely new concepts and workflows.

Docker's approach to isolated environments, image management, and microservice architecture requires a significant shift in understanding from traditional methods.

Many engineers and developers feel overwhelmed by the rapidly growing cloud and containerization ecosystem, making it challenging for them to enter the world of containers.

"Painless Docker" aims to bridge this gap, providing a comprehensive guide to help you smoothly transition to Docker's innovative ecosystem, enhancing your development and deployment processes efficiently.

"Painless Docker" serves as a gateway to Docker's world, helping you become proficient in its usage. You'll discover that using Docker is easy and efficient for your development and operations environments.

"Painless Docker" is a comprehensive and detailed guide that covers Docker and a significant portion of its ecosystem. This guide is designed for beginners and intermediate levels, providing step-by-step guidance. It starts with basic concepts and progresses to advanced features. By the end, readers will have mastered Docker and microservices, including their development and production usage. The guide also covers Docker Compose, Docker Swarm, and important tools from the ecosystem.

These are the 10 most important things you will learn:

  • Basics and advanced concepts of Docker: An in-depth exploration of Docker beyond just an introduction.
  • Building and deploying your own images in production: From the build process to running containers.
  • Docker volumes, storage management, filesystems, and storage drivers.
  • Networking and advanced concepts such as SDN, cloud drivers, and more.
  • Optimizing Docker: Techniques for creating efficient images and running containers.
  • Building tools that integrate with Docker using the Docker API.
  • Docker logging and debugging: Monitoring Docker health and troubleshooting issues.
  • Docker orchestration using Swarm: Overlay networks, ingress, and tools for setting up a production cluster.
  • Understanding how Docker works and how to build your own Docker (containerd, runC, shim, namespaces, seccomp, cgroups..etc)
  • Docker security and best practices: Essential knowledge for maintaining a stable and secure production system.

Share this book

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

Painless Docker Guide

Minimum price

Suggested price$25.99

$19.99

    Buying multiple copies for your team? See below for a discount!

    Painless Docker Guide + Get 3 extra hours of personalized guidance

    Minimum price

    Suggested price$350.00

    Enhance your learning experience with an exclusive offer: Get 3 extra hours of personalized guidance with the purchase of 'Painless Docker'. Be accompanied by the author for dedicated support, tailored to your specific needs and questions

    $350.00

    • Personalized Support Package
      Dear Valued Reader, Thank you for considering the purchase of 'Painless Docker' along with the exclusive Personalized Support Package. This unique offering provides you with 3 successive hours of dedicated support from the author (call), designed to enhance your understanding and application of Docker. To facilitate this personalized support session please share your email. The author will contact you via email to schedule a suitable time for the session. This will also be an opportunity for you to outline specific topics or questions you wish to explore during the session. Thanks, Aymen

    Team Discounts

    Team Discounts

    Get a team discount on this package: Painless Docker Guide

    • Up to 3 members

      Minimum price
      $49.00
      Suggested price
      $64.00
    • Up to 5 members

      Minimum price
      $79.00
      Suggested price
      $103.00
    • Up to 10 members

      Minimum price
      $139.00
      Suggested price
      $181.00
    • Up to 15 members

      Minimum price
      $199.00
      Suggested price
      $259.00
    • Up to 25 members

      Minimum price
      $299.00
      Suggested price
      $389.00

    Author

    About the Author

    Aymen El Amri

    Aymen El Amri is an author, entrepreneur, trainer, and polymath software engineer who has excelled in a range of roles and responsibilities in the field of technology including DevOps & Cloud Native, Cloud Architecture, Python, NLP, Data Science, and more.

    Aymen has trained hundreds of software engineers and written multiple books and courses read by thousands of other developers and software engineers.

    Aymen El Amri has a practical approach to teaching based on breaking down complex concepts into easy-to-understand language and providing real-world examples that resonate with his audience.

    Some projects he founded are FAUN, eralabs.io, and Marketto. You can find Aymen on Twitter and Linkedin.

    Leanpub Podcast

    Episode 88

    An Interview with Aymen El Amri

    Contents

    Table of Contents

    Preface

    1. To Whom Is This Guide Addressed?
    2. How To Properly Enjoy This Guide
    3. Join the community

    The Missing Introduction to Containerization

    1. We Are Made by History
    2. Jails, Virtual Private Servers, Zones, Containers, and VMs: What’s the Difference Anyway?
    3. OS Containers vs. App Containers
    4. Docker: Container or Platform?
    5. The Open Container Initiative: What is a Standard Container?
    6. A Deep Dive into Container Prototyping with runC
    7. Industry Standard Container Runtimes
    8. containerd, shim and runC: How Everything Works Together
    9. Adding a New Runtime to Docker
    10. Does CRI Mean the Death of Docker?
    11. The Moby Project

    Installing and Using Docker

    1. Installing Docker
    2. Docker CLI

    Docker Events

    1. Using Docker API To List Events

    Docker Containers

    1. Creating Containers
    2. Running Containers
    3. Restarting Containers
    4. Pausing and Unpausing Containers
    5. Stopping Containers
    6. Killing Containers
    7. Removing Containers
    8. Container Lifecycle
    9. Starting Containers Automatically
    10. Accessing Containers Ports
    11. Running Docker In Docker

    Managing Containers Resources

    1. Memory Usage Reservations and Limits
    2. CPU Usage Reservations and Limits

    Docker Images

    1. What is an Image?
    2. Images are Layers
    3. Images, Intermediate Images & Dangling Images
    4. The Dockerfile and its Instructions
    5. The Base Image
    6. Extending the Base Image
    7. Exploring Images’ Layers
    8. Building an Image Using a Dockerfile
    9. Creating Images out of Containers
    10. Migrating a VM to a Docker Image
    11. Creating and Understanding the Scratch Image

    Docker Hub and Docker Registry

    1. Docker Hub, Public and Private Registries
    2. Docker Hub: The Official Docker Registry
    3. Using Docker Hub
    4. DockerHub Alternatives
    5. Creating a Private Docker Registry

    Optimizing Docker Images

    1. Less Layers = Faster Builds?
    2. Is There a Maximum Number of Layers?
    3. Optimizing Dockerfile Layer Caching for Dependency Management
    4. The Multi-Stage Build
    5. Smaller Images
    6. Other Techniques: Squashing, Distroless, etc

    Docker Volumes

    1. What is a Docker Volume?
    2. Creating and Using Docker Volumes
    3. Listing and Inspecting Docker Volumes
    4. Named Volumes vs Anonymous Volumes
    5. Bind Mounts
    6. Data Propagation
    7. Dangling Volumes
    8. TMPFS Mounts
    9. Docker Volume From Containers

    Docker Logging

    1. How Docker Logs Work
    2. Logging Best Practices and Recommendations
    3. Logging Drivers
    4. Docker Daemon Logging

    Docker Networks

    1. Docker Networks Types
    2. The (System) Bridge Network
    3. The (User) Bridge Network
    4. The Host Network
    5. The None Network
    6. The Macvlan Network
    7. The Overlay Network
    8. The Ingress Network
    9. Docker Links

    Docker Compose

    1. What is Docker Compose and Why Should I Care?
    2. Installing Docker Compose
    3. Understanding Docker Compose and How it Works
    4. Docker Compose Dependencies
    5. Creating Portable Docker Compose Stacks
    6. Docker Compose Logging
    7. Understanding Docker Compose Syntax
    8. Using Dockerfile with Docker Compose
    9. Docker Compose with Bind Mounts
    10. Creating Custom Networks
    11. Docker Compose Secrets
    12. Scaling Docker Compose Services

    Cleaning Docker

    1. Delete Volumes
    2. Delete Networks
    3. Delete Images
    4. Remove Docker Containers
    5. Cleaning Up Everything

    Docker Plugins

    Orchestration - Docker Swarm

    1. What is Docker Swarm?
    2. Creating a Swarm Cluster
    3. Swarm Services and Tasks
    4. Networking in Docker Swarm
    5. Performing Operations on Nodes
    6. Multi-manager Docker Swarm
    7. Docker Swarm Environment Variables and Secrets
    8. Docker Swarm Volumes
    9. Deploying a WordPress Application on Docker Swarm
    10. Docker Swarm Global Services
    11. Docker Swarm Resouce Management
    12. Docker Swarm Stacks
    13. Docker Swarm Rolling Updates
    14. Using an External Load Balancer with Docker Swarm
    15. Using Traefik as a Front-End Load Balancer with Docker Swarm
    16. Docker Swarm Logging
    17. Docker Swarm vs. Kubernetes

    Docker Desktop

    1. What is Docker Desktop?
    2. How to Install Docker Desktop

    Common Security Threats

    1. Docker vs. VMs: Which is more secure?
    2. Kernel Panic & Exploits
    3. Container Breakouts & Privilege Escalation
    4. Poisoned Images
    5. Denial-of-service Attacks
    6. Compromising secrets
    7. Application Level Threats
    8. Host System Level Treats

    Docker Security Best Practices

    1. Implement Security by Design
    2. setuid/setgid Binaries
    3. Control Resources
    4. Use Notary to Verify Image Integrity
    5. Scan Images
    6. Set Container Filesystem to Read Only
    7. Set Volumes to Read-Only
    8. Do Not Use the Root User
    9. Run the Docker Daemon in Rootless Mode
    10. Do Not Use Environment Variables For Sensitive Data
    11. Use Secret Management Tools
    12. Do Not Run Containers in the Privileged Mode
    13. Turn Off Inter-Container Communication
    14. Only Install Necessary Packages
    15. Make Sure Docker is up to Date
    16. Security Through Obscurity
    17. Use Limited Linux Capabilities
    18. Use Seccomp
    19. Use AppArmor
    20. Use SELinux

    Docker API

    1. Docker SDKs
    2. Docker API: Hello World
    3. Prototyping a Log Collector Service

    Debugging And Troubleshooting

    1. Docker Daemon Logs
    2. Activating Debug Mode
    3. Debugging Docker Objects
    4. Troubleshooting Docker Using Sysdig

    The Ultimate Docker Cheat Sheet

    1. Installation
    2. Docker Registries & Repositories
    3. Running Containers
    4. Starting & Stopping Containers
    5. Getting Information about Containers
    6. Managing Images
    7. Networking
    8. Cleaning Docker
    9. Docker Swarm
    10. Docker Scout Suite
    11. Resources

    Afterword

    1. What’s next?
    2. Thank you
    3. About the author
    4. Join the community
    5. Feedback

    The Leanpub 60 Day 100% Happiness Guarantee

    Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

    Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

    You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

    So, there's no reason not to click the Add to Cart button, is there?

    See full terms...

    Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

    We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

    (Yes, some authors have already earned much more than that on Leanpub.)

    In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

    Learn more about writing on Leanpub

    Free Updates. DRM Free.

    If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

    Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

    Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

    Learn more about Leanpub's ebook formats and where to read them

    Write and Publish on Leanpub

    You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

    Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

    Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

    Learn more about writing on Leanpub