One reason why i run everything on my development machine in a docker container, you can't trust any package.
I use bun, but similar could be done with npm
Add to .bashrc:
alias bun='docker run --rm -it -u $(id -u):$(id -g) -p 8080:8080 -v "$PWD":/app -w /app my-bun bun "$@"'
then you can use `bun` command as usual.Dockerfile:
FROM oven/bun:1 AS base
VOLUME [ "/app" ]
EXPOSE 8080/tcp
WORKDIR /app
# Add your custom libs
# RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y install \
# ... \
Create once the container: $ docker build -t "my-bun" -f "Dockerfile" .