2023-11-07 00:48:38 +01:00
|
|
|
FROM ubuntu:jammy
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2022-12-23 22:21:06 +01:00
|
|
|
|
|
|
|
RUN apt-get update
|
2023-11-07 00:48:38 +01:00
|
|
|
RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
|
|
|
build-essential libssl-dev python3-dev ca-certificates curl gnupg xauth xvfb
|
|
|
|
|
|
|
|
# Copied from
|
|
|
|
# https://github.com/nodejs/docker-node/blob/bdf5edb7/18/bullseye/Dockerfile
|
|
|
|
|
|
|
|
RUN groupadd --gid 1000 node \
|
|
|
|
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
|
|
|
|
|
|
|
|
ENV NODE_VERSION 18.18.2
|
|
|
|
|
|
|
|
RUN ARCH='x64' \
|
|
|
|
&& export GNUPGHOME="$(mktemp -d)" \
|
|
|
|
# gpg keys listed at https://github.com/nodejs/node#release-keys
|
|
|
|
&& set -ex \
|
|
|
|
&& for key in \
|
|
|
|
4ED778F539E3634C779C87C6D7062848A1AB005C \
|
|
|
|
141F07595B7B3FFE74309A937405533BE57C7D57 \
|
|
|
|
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
|
|
|
|
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
|
|
|
|
61FC681DFB92A079F1685E77973F295594EC4689 \
|
|
|
|
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
|
|
|
|
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
|
|
|
|
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
|
|
|
|
108F52B48DB57BB0CC439B2997B01419BD92F80A \
|
|
|
|
; do \
|
|
|
|
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
|
|
|
|
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
|
|
|
|
done \
|
|
|
|
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.gz" \
|
|
|
|
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
|
|
|
|
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
|
|
|
|
&& gpgconf --kill all \
|
|
|
|
&& rm -rf "$GNUPGHOME" \
|
|
|
|
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.gz\$" SHASUMS256.txt | sha256sum -c - \
|
|
|
|
&& tar -xzf "node-v$NODE_VERSION-linux-$ARCH.tar.gz" -C /usr/local --strip-components=1 --no-same-owner \
|
|
|
|
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.gz" SHASUMS256.txt.asc SHASUMS256.txt \
|
|
|
|
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
|
|
|
|
# smoke tests
|
|
|
|
&& node --version \
|
|
|
|
&& npm --version
|
|
|
|
|
|
|
|
# For this package
|
2022-12-23 22:21:06 +01:00
|
|
|
|
2023-11-10 15:31:38 +01:00
|
|
|
# WORKDIR /app
|
2022-12-23 22:21:06 +01:00
|
|
|
COPY package*.json binding.gyp *.cc ./
|
|
|
|
|
|
|
|
RUN npm install
|
|
|
|
|
2023-11-10 15:31:38 +01:00
|
|
|
RUN mkdir -p ../out
|
|
|
|
|
2022-12-23 22:21:06 +01:00
|
|
|
COPY . .
|