3 ms·
> What's a meme is creating a container for any minor thing like npm + some js project. Or to run one Go binary. You couldn't have picked two more different ex
by piaste 4y ago
> What's a meme is creating a container for any minor thing like npm + some js project. Or to run one Go binary.
You couldn't have picked two more different examples.
Go apps are generally pretty clean statically-linked, native binaries and will be happy to just run from their directory without touching anything else. Containerization is usually unneeded, though if you already have a container ecosystem then they will fit in with no fuss, since the container images are basically glorified tarballs (COPY app/ . RUN foo).
Node.js apps on the other side combine an interpreted language, a messy package management ecosystem, and a fragile and persnickety toolchain that will happily leave dirty stuff in your filesystem and/or your PATH, in order to maximize the risk of dependency-related screwups. Containerization is an absolute godsend for them.
- raverbashing 4y ago> Go apps are generally pretty clean statically-linked, I know, that's why I put it as an example (of something that doesn't need docker) > and a fragile and persnickety toolchain that will happily leave dirty stuff in your filesystem and/or your PATH Docker existing shouldn't be an excuse for npm behaving like this ;) But I agree, for deployment it is good. But you can still run npm projects without it
- yjftsjthsd-h 4y ago> Docker existing shouldn't be an excuse for npm behaving like this ;) I don't care about the direction of causality, I just want the stupid thing to run on my computer and not pollute my home directory,and docker solves that and solves it well. Edit: Although actually about the only time I'm touching node is to ship it in a container image for deployment on a cluster somewhere, which is even more compelling.
- sedachv 4y agoThere are much better tools for doing that, such as Guix profiles and nix-shell, which also happen to be better tools for making container images. Linux container images are a distribution mechanism that does not do anything to address package and dependency management other than shifting the problem somewhere else.
- yjftsjthsd-h 4y agonix/guix are also good solutions, but they have a much higher learning curve than a Dockerfile; I would even be willing to suggest that docker is not the true best solution to any problem it solves, but in my experience it is the easiest solution to most of them