| 1 | ARG VARIANT=latest |
| 2 | FROM oven/bun:${VARIANT} |
| 3 | |
| 4 | RUN apt-get update \ |
| 5 | && apt-get -y install --no-install-recommends \ |
| 6 | ca-certificates \ |
| 7 | git \ |
| 8 | nano \ |
| 9 | vim-tiny \ |
| 10 | && apt-get autoremove -y \ |
| 11 | && apt-get clean -y \ |
| 12 | && chsh -s $(which bash) bun |
| 13 | |
| 14 | # Switch to bun user |
| 15 | USER bun |
| 16 | |
| 17 | # Add bun to path |
| 18 | ENV PATH=~/.bin/bin:${PATH} |
| 19 | |
| 20 | # [Optional] Uncomment this section to install additional OS packages. |
| 21 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ |
| 22 | # && apt-get -y install --no-install-recommends <your-package-list-here> |
| 23 | |
| 24 | # [Optional] Uncomment if you want to install an additional version of node using nvm |
| 25 | # ARG EXTRA_NODE_VERSION=10 |
| 26 | # RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" |
| 27 | |
| 28 | # [Optional] Uncomment if you want to install more global node modules |
| 29 | # RUN su node -c "npm install -g <your-package-list-here>" |