-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-node
20 lines (18 loc) · 1019 Bytes
/
Dockerfile-node
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ARG RUST_VERSION
FROM "ghcr.io/tweedegolf/rust-dev:${RUST_VERSION}"
# Install node.js
ARG NODE_VERSION
ENV NODE_VERSION ${NODE_VERSION}
RUN curl -s -L https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install yarn
RUN curl -s -L https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/yarn.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
yarn \
&& rm -rf /var/lib/apt/lists/*