Hacker News new | ask | show | jobs
by darkwater 1482 days ago
The idea is to have the same build pipeline that works locally or in prod. In the end it keeps being an holy grail because dev requirements usually differ from prod requirements (i.e. code hot-reload as fast as possible with interpreted languages in dev vs slimmest possible image in prod).
1 comments

You can just have multiple stages in the same Dockerfile, one for dev and another for prod, and have your docker compose yml file target the dev one.
Yes, I did exactly this at $DAYJOB, the holy grail for me would be to have the exact same build process without any "if $environment". But anyway I agree it is good enough.