Containerizing Applications with Docker
Over the last decade, Docker containerization has become a kind of default packaging format for web applications and modern microservices. In a container, your program sits in a very lightweight, isolated shell of Linux filesystem, process, user, and network abstractions, safely separate from the host environment. Container images also happen to be incredibly portable – they’re easy to shuffle around from a developer’s laptop to a testing or staging environment to a production server. This solves many of the problems that have plagued software and infrastructure over the last several decades.
In some sense, containers are quite similar to the Linux packages you’ve learned how to install from repositories. A container image is, roughly, a compressed archive (such as, a .tar.gz
file) of your application, along with all the configuration files and dependencies the application needs. That little package – an...