This has a bunch of purported benefits (you maintain one way to run your app, you test all the deps while developing), but note that it's never exactly the same setup.
It also has a bunch of issues like performance (in a large team, images change often, which means redownloading image layers or entire images; starting up containers adds an overhead too, especially noticable with running unit tests), flexibility (unless you run a full cluster locally, it's usually harder to work on multiple branches of your software at the same time since containers would be configured to use the same internet ports) and complexity.
I think an ideal would be containers for local dev work without tying them to production images so they can be optimized for different goal, but I've never seen that. The big issue there is that Dockerfiles are not composable (ie you can't have a install-deps sub Dockerfile that follows the caching semantics).
No comments yet.