Hacker News new | ask | show | jobs
by tompazourek 1891 days ago
FYI PowerShell is pretty cross-platform these days.

But I see having it all written in JS is still simpler.

1 comments

I don't know about simpler :)

My preference is to eliminate the OS discrepancy by making Docker images the building block of the stack in dev environments, CI pipelines, and production deployments. This means you pay a constant and predictable amount of operational complexity, but eliminate the entire class of constraints caused by cross-platform variability. Seems like a good deal, trading a variable cost for a constant one.

Then you can use Bash! Or fish, or some hipster shell you found on lobste.rs. Just install it in the Docker image.

I've read about NixOS here on HN which aims to do something similar.

Does your approach with using docker heavily have some disadvantages you experienced? Just curious, it sounds interesting...

Yes, lots. You need to pay operational complexity early and often. A lot of tools don't work out of the box due to volume sharing, permission issues, etc. You need to figure out dev vs. prod images, how to do incremental builds locally (e.g. you switch branches) and in CI (new push). Lots of issues like this.

Overall it's worth it in the end if you're making a long term investment, IMO. It forces you to build modular infrastructure from the beginning, so there are few surprises when pushing to prod.