Beer and tacos and the metaphorical origins of Docker containers

containers   kubernetes   beer   tacos  

New public workshop: Architecting for fast, sustainable flow - enabling DevOps and Team Topologies thru architecture. Learn more and enroll.

Recently, after spending a big part of the day trapped in Kubernetes ecosystem YAML hell, I was desperate to get out of the house. I went to Faction Brewing, which is a local brewpub, for a beer and some tacos. But even there, I couldn’t escape from containers. The brewery is across the Oakland Estuary from the port of Oakland and off in the distance I could see a couple of cargo ships that were being loaded with containers. Not surprisingly, as I drank my beer, I started to think about the metaphorical origins of Docker containers

Faction Brewery

Containers the metaphor

The Box book

Docker containers draw their metaphorical inspiration from inter-modal shipping containers. As the excellent book The Box describes, shipping was inefficient, and expensive before the invention of inter-modal shipping containers. For example, in order to load a ship, longshore men had to manually load and stow tens of thousands cargo items of all shapes, sizes and weights, which was very labour intensive, and dangerous. Shipping containers revolutionized global trade. Goods are packaged and secured in containers of standardized sizes that are easily transported to and from ports and rapid loaded/unloaded from ships. This resulted in streamlined logistics and improved efficiency in global supply chains.

In the same way, Docker containers provide a standard way to package and run applications. Once an application has been packaged as a container image, its technology stack no longer matters. A container is created and managed regardless of whether it is, for example, a Java or GoLang application. Similarly, the details of the execution environment that runs the container are hidden from the application.

Containers are not black boxes

While it might appear that containers - shipping or Docker - are black boxes that can be treated uniformly, they have distinct characteristics that affect how they are handled.

Ignoring a shipping container’s attributes can be dangerous

Although a shipping container has a standardized size, it has various attributes that can influence where it is placed on a cargo shop Its weight is a critical concern since unless a ship has the correct weight distribution it might buckle or capsize. This requirement even affects the order in which containers are loaded onto a ship. Moreover, a shipping container has other attributes that determine placement such as power needs for refrigeration and whether its a fire hazard.

Docker containers have attributes that affect placement

Similarly, Docker containers have attributes that affect where they are placed on the infrastructure. For example, the Kubernetes scheduler considers the following attributes when placing a container (strictly speaking a Pod, which is a collection of containers) on a node including the container’s resource requirements - CPU, memory, storage, etc., and constraints such as affinity and anti-affinity.

Docker containers have externalized configuration

In addition to infrastructure-level attributes, a container typically has externalized configuration that is used to customize its behavior. For example, an application service needs to be configured with the location of a database. This configuration is typically provided via environment variables or configuration files.

Final thoughts

To sum it up, shipping containers, which are the metaphorical inspiration for Docker containers, revolutionized global trade, while Docker containers revolutionized application packaging and deployment. Although they may seem like black boxes, both types of containers have unique attributes that impact their handling and placement. Shipping containers have attributes such as weight, power needs, and fire hazards, while Docker containers have attributes such as resource requirements, constraints on placement and externalized configuration.

One interesting historical fact is that the Port of San Francisco thought that containers were a passing fad where as Oakland embraced them. That’s why today container ships ignore San Francisco and sail to Oakland. An important reminder that it’s important to embrace change.

containers   kubernetes   beer   tacos  

Copyright © 2024 Chris Richardson • All rights reserved • Supported by Kong.

About is brought to you by Chris Richardson. Experienced software architect, author of POJOs in Action, the creator of the original, and the author of Microservices patterns.

New workshop: Architecting for fast, sustainable flow

Enabling DevOps and Team Topologies thru architecture

DevOps and Team topologies are vital for delivering the fast flow of changes that modern businesses need.

But they are insufficient. You also need an application architecture that supports fast, sustainable flow.

Learn more and register for my June 2024 online workshops....


I help organizations improve agility and competitiveness through better software architecture.

Learn more about my consulting engagements, and training workshops.

LEARN about microservices

Chris offers numerous other resources for learning the microservice architecture.

Get the book: Microservices Patterns

Read Chris Richardson's book:

Example microservices applications

Want to see an example? Check out Chris Richardson's example applications. See code

Virtual bootcamp: Distributed data patterns in a microservice architecture

My virtual bootcamp, distributed data patterns in a microservice architecture, is now open for enrollment!

It covers the key distributed data management patterns including Saga, API Composition, and CQRS.

It consists of video lectures, code labs, and a weekly ask-me-anything video conference repeated in multiple timezones.

The regular price is $395/person but use coupon GIVLKECM to sign up for $145 (valid until June 19th, 2024). There are deeper discounts for buying multiple seats.

Learn more

Learn how to create a service template and microservice chassis

Take a look at my Manning LiveProject that teaches you how to develop a service template and microservice chassis.

Signup for the newsletter

BUILD microservices

Ready to start using the microservice architecture?

Consulting services

Engage Chris to create a microservices adoption roadmap and help you define your microservice architecture,

The Eventuate platform

Use the platform to tackle distributed data management challenges in your microservices architecture.

Eventuate is Chris's latest startup. It makes it easy to use the Saga pattern to manage transactions and the CQRS pattern to implement queries.

Join the microservices google group