File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,9 +2,22 @@ ARG VARIANT="3"
22
33FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}
44
5+ ARG NODE_VERSION="20"
56ARG POETRY_VERSION="1.8.2"
67ARG POETRY_SRC="https://install.python-poetry.org"
78
9+ # https://github.com/microsoft/vscode-dev-containers/blob/main/containers/go/.devcontainer/base.Dockerfile
10+ ENV USERNAME=vscode
11+ ENV LIBRARY_SCRIPTS_SRC="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/main/containers/go/.devcontainer/library-scripts/node-debian.sh"
12+ ENV NVM_DIR=/usr/local/share/nvm
13+ ENV NVM_SYMLINK_CURRENT=true \
14+ PATH=${NVM_DIR}/current/bin:${PATH}
15+ RUN mkdir /tmp/library-scripts \
16+ && curl -fsSL -o /tmp/library-scripts/node-debian.sh "${LIBRARY_SCRIPTS_SRC}"
17+ RUN bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "${NODE_VERSION}" "${USERNAME}" \
18+ && apt-get clean -y && rm -rf /var/lib/apt/lists/* \
19+ && rm -rf /tmp/library-scripts
20+
821USER vscode
922WORKDIR /home/vscode
1023
Original file line number Diff line number Diff line change 44 "build" : {
55 "dockerfile" : " Dockerfile" ,
66 "args" : {
7+ "NODE_VERSION" : " 20" ,
78 "POETRY_VERSION" : " 1.8.2" ,
89 "VARIANT" : " 3.12"
910 }
1718 " ms-python.python" ,
1819 " EditorConfig.EditorConfig"
1920 ],
20- "postCreateCommand" : " poetry install" ,
21+ "postCreateCommand" : " poetry install && npm install " ,
2122 "remoteUser" : " vscode"
2223}
You can’t perform that action at this time.
0 commit comments