File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ FROM codercom/code-server:latest AS builder
2121# Set arguments for tool versions.
2222ARG MINIFORGE_VERSION=23.11.0-0
2323ARG PYTHON_VERSION=3.11
24+ ARG NODE_VERSION=20
2425
2526# Define global environment variables for paths and timezone.
2627ENV CONDA_DIR=/opt/conda
@@ -38,10 +39,12 @@ RUN \
3839 git \
3940 build-essential \
4041 tzdata \
41- nodejs \
42- npm \
4342 && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
44- && npm install -g npx \
43+ # Install Node.js from official repository.
44+ && mkdir -p /etc/apt/keyrings \
45+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
46+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
47+ && apt-get update && apt-get install -y nodejs \
4548 \
4649 # 2. Install Miniforge (Conda).
4750 && wget "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-x86_64.sh" -O miniforge.sh \
@@ -98,6 +101,8 @@ RUN echo "Verifying root environment..." && \
98101 python --version && \
99102 conda --version && \
100103 uv --version && \
104+ npm -v && \
105+ node -v && \
101106 echo "Root environment check PASSED!"
102107
103108# Final check as CODER.
You can’t perform that action at this time.
0 commit comments