Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You should probably put some quotes around `$PWD`:

  alias npm='docker run --rm -it -v "$PWD:$PWD" --net=host --workdir="$PWD" node:25-bookworm-slim npm'
...Does this always work? I don't use much JS. Doesn't NPM sometimes build against system libs, which could be different in the container?




> You should probably put some quotes around `$PWD`:

Yeah, fair point.

> Doesn't NPM sometimes build against system libs, which could be different in the container?

Yes, and I run all JS inside a container.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: