Dockerfiles that keep local and staging honest
Complete post with author details, sharing, and comments.
Dockerfiles that keep local and staging honest
Practical Dockerfile habits for PHP/Laravel stacks and shared services.
Pin what you ship
I pin base image digests or minor versions so composer install does not silently change behavior when a teammate pulls latest.
- Separate build and runtime stages
- Copy only manifests before dependency install for better cache
- Use .dockerignore to keep contexts small
One compose file, many environments
Environment variables drive ports and credentials; the compose topology stays stable so onboarding is one command.
Containers are documentation that executes.
Favorite posts
Why I structure Laravel apps in layers from day one
2026-05-06
Scope, buffers, and async updates that protect your calendar
2026-05-11
Security habits I repeat on every new repository
2026-05-12
Queues in Laravel: when I reach for them first
2026-05-07
No comments yet.