Compose, the comic

One card for the whole dinner.

The same kitchen as the other comics. A dinner is more than one dish, and the compose file is the card that says how to cook all of it together. When the dinner moves to Cas’s kitchen at home, it also says what has to come along.

1 One card, the whole dinner

A dinner is more than one dish: soup, pizza, dessert, each from its own pot. The compose file is the recipe card for all of it together, and the dinner is a project.
One card,the whole dinner.
Up cooks everything on the card, down clears the table. The card stays on the board, so the project stays on the list.
Down for tonight,up tomorrow.The card stayson the board.
The app shows the card as you wrote it, and the card as the cook reads it: every amount filled in, every default written out. That is the configuration compose makes of it.
A pinch of salt…that is 2 grams.

2 The recipe changed

You change the card: more salt from now on. The soup already on the stove was made the old way. That is drift: a service still running on settings from before you edited the compose file.
More saltfrom now on.This soup hasthe old salt.
Update fetches fresh ingredients and cooks again only what changed: pull and recreate in one go. The pizza that did not change stays where it is.
Only the soupagain. Pizza stays.
Some things you make yourself, like the bread: a service built from its own Dockerfile. Rebuild just that one, and watch the oven while it bakes: the build output, right there.
Only the bread,again.

3 Dinner at Cas’s place

Cas has a kitchen at home: your own server. Before the dinner goes there, the app lists what goes along: the pots, the pantry and how heavy it is, and the jars from your own cupboard.
Pots, the pantry,your own jars…
And what could go wrong over there: a door that is already taken at Cas’s place, or a different kind of stove, another architecture.
8080Door 8080 istaken here.
The jars from your own cupboard do not exist at Cas’s place. Docker would quietly put out an empty jar with the same label, and the dinner starts without its food.
?It says jam.It is empty.

4 Packing for the trip

So per jar a choice: into a crate for their pantry, a volume filled with what is here; a single jar written out on a card, a config with its content; a shelf over there; or left out. Your own card stays as it is.
This one goesin the crate.That onestays home.
Copy it, and the dinner is on in both kitchens; move it, and it stops here. Step by step, with the time each step took.
Copy: dinner inboth kitchens.
If a step fails, everything is taken back out of Cas’s kitchen, and the dinner starts here again. Nobody goes hungry.
Back it comes.Dinner is on here.

5 From here, over there

Changed the card here? The app shows what that changes at Cas’s place, and brings the new card over. The pantry there stays as it is.
The new cardfor tonight.New card,same pantry.
And from here you can stop or start the dinner at Cas’s place, without switching kitchens.
Cas? Start thedinner, please.Starting itnow!
In Docker Client MX: the Compose page, with every project as one group, and a line under the ones that also run somewhere else.
THE END

The cheat sheet

Every picture above, in Docker words.

The recipe card
A compose file
The whole dinner
A compose project
One dish
A service
Cooking, clearing the table
Up, down
The card as the cook reads it
The configuration compose makes of it
Soup made the old way
Drift
Cooking again what changed
Update: pull and recreate
Baking your own bread
A service with build:
Cas’s kitchen at home
Your own server
Jars from your own cupboard
Bind mounts
A crate for their pantry
A volume filled with what is here
A jar written out on a card
A config with its content
Everything back, dinner here
Rolling back
Now cook from the card yourself.
Every project as one group, what drifted from its file, updates in one move, and a project taken to your own server with everything it needs.