Skip to content

Instantly share code, notes, and snippets.

@bheisig
Last active January 12, 2022 14:28
Show Gist options
  • Save bheisig/a89df0b5fcda5ee481c314b26d1b78f2 to your computer and use it in GitHub Desktop.
Save bheisig/a89df0b5fcda5ee481c314b26d1b78f2 to your computer and use it in GitHub Desktop.
Base Docker image to run latest npm with Debian 10 "buster"
FROM debian:buster
ARG DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-l", "-euxo", "pipefail", "-c"]
RUN apt-get update; \
apt-get full-upgrade -y; \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*
ENV NVM_DIR /usr/local/nvm
RUN mkdir -p "$NVM_DIR"; \
curl -o- \
"https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh" | \
bash \
; \
source $NVM_DIR/nvm.sh; \
nvm install --lts --latest-npm
RUN command -v nvm; \
command -v node; \
node --version; \
command -v npm; \
npm --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment