6.5Lessons from the field
The essentials in 30 seconds
- Prevent: .dockerignore from the very first Dockerfile, healthcheck + retry, immutable tags — cheapest is to avoid.
- Prove: replayed backup, down/up with no loss, early proxy — what is not proven does not exist.
- Doubt: latest in prod, never-replayed dumps and messy ports always bite — no myths.
Idir's thread — what the quarter taught him
After one quarter, Idir sums up his practice in Algiers in five sentences: write the .dockerignore first, require the healthcheck, ban latest in prod, believe only replayed backups, set up the proxy early. And the golden rule on the wall: what is not versioned, proven and tested does not exist.
Keep one principle and dismiss one myth: that is how experience settles in.
What practitioners recommend
Anonymous synthesis of widely shared best practices from the official documentation, community feedback and operations guides (no fabricated quotes: what follows aggregates public, verifiable recommendations).
✓ To do
- "The .dockerignore first": what never enters the context breaks neither the cache nor security.
- "The healthcheck changes everything": switching to a healthy condition + retry makes startup crashes disappear.
- "Immutable tags in prod": the cheapest insurance against the rebuild that breaks everything on a Friday evening.
- "The tested backup, not the backup": test volume + verification, otherwise it is an illusion.
- "A proxy early": from the second app on, to avoid port debt and prepare TLS and logs.
✗ To avoid
- "latest in prod, we'll see" — no: a harmless rebuild pulls a major version and breaks everything.
- "My dump runs, so I'm safe" — no: with no replayed restore, it is an illusion.
- "depends_on is enough, no need for a healthcheck" — no: with no healthy condition or retry, crashes come back.
- "One port per app, we'll handle it later" — no: with no early proxy, port debt explodes.
Ready-to-say script — speaking as a practitioner (30 s)
"My context: [.dockerignore from the start]. My reliability: [healthcheck + retry, 1.0 tags]. My proof: [replayed backup, down/up with no loss]. My exposure: [early proxy, TLS, logs]."
Copy-paste template — practitioner ritual (5 lines)
docker compose config
docker compose up -d --build
docker compose ps
docker compose logs -f api
docker system df
Small business / tight budget
One principle per quarter is enough: .dockerignore + healthcheck first, the rest after.
SME in Algiers
Adapt to local releases: replayed backup and down/up proof at each milestone.
Remote / hybrid
Prioritise written traces remotely (validated config, replayed proof, dated tags).
Intercultural
Prioritise local transposition as soon as codes differ: ask peers, compare practices.
48h challenge — apply tomorrow
Apply 1 practitioner principle (.dockerignore, healthcheck, 1.0 tags, replayed backup, early proxy) to your current stack and dismiss 1 myth.
- I know the practitioners' 5 principles and the 4 myths to dismiss.
- My practitioner ritual (prevent, prove, prepare) is started.
- I did the 48h challenge or scheduled its date.
Idir wants to grow like the practitioners. What does the field say?
Experience cannot be bought: it is built by versioning, proving and testing, stack after stack.