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 "$@"'
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 \ # ... \
$ docker build -t "my-bun" -f "Dockerfile" .
I use bun, but similar could be done with npm
Add to .bashrc:
then you can use `bun` command as usual.Dockerfile:
Create once the container: