mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-12 18:16:43 +00:00
Add NodeJS inside Docker image (#421)
This commit is contained in:
1 file changed
+13
-2
+13
-2
@@ -3,8 +3,8 @@ FROM python:3.11-slim AS base
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# Set environment variables to make Python print directly to the terminal and avoid .pyc files.
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Install system dependencies required for package manager and build tools.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
@@ -18,6 +18,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN python3 -m pip install --no-cache-dir pipx \
|
||||
&& pipx ensurepath
|
||||
|
||||
# Install nodejs
|
||||
ENV NVM_VERSION=0.40.3
|
||||
ENV NODE_VERSION=22.18.0
|
||||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash
|
||||
# standard location
|
||||
ENV NVM_DIR=/root/.nvm
|
||||
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
|
||||
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
|
||||
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
|
||||
ENV PATH="${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}"
|
||||
|
||||
# Add local bin to the path
|
||||
ENV PATH="${PATH}:/root/.local/bin"
|
||||
|
||||
|
||||
Reference in new issue
Block a user