Docker has transformed software development with its simple model of containerization that lets you rapidly package workloads into reproducible units. While Docker’s easy to get to grips with, there’s more nuance to its usage than is always apparent. This is especially true when you’re looking to optimize your Docker usage to increase efficiency and performance.
Docker images are created from a Dockerfile that defines a base image and a series of instructions that add your own filesystem layers. What happens if you want to make your own “base image” though? Here’s how to start from scratch and create a complete container filesystem from the ground up.
Docker labels let you attach arbitrary metadata to your containers, images, volumes, and other resources. You can tag your Docker objects with information specific to your organization, workflow, or toolchain.
With containerized applications running in isolated environments, it can be harder than usual to track down problems with applications using too much storage space. Fortunately, Docker provides commands for managing container disk usage.
Kubernetes and Docker’s Swarm mode are two container orchestration tools that let you scale workload replicas across multiple physical machines. Although Kubernetes is the more popular choice, Docker Swarm has some unique benefits that are worth considering too.