Skip to content

Commit ec1a007

Browse files
committed
cleaning for cross compatibility.
1 parent 61d97d8 commit ec1a007

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ FROM mcr.microsoft.com/devcontainers/python:0-${VARIANT}
44

55
ARG NODE_VERSION="none"
66

7-
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg > /dev/null \
8-
&& echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list \
7+
RUN rm -f /etc/apt/sources.list.d/yarn.list /usr/share/keyrings/yarn.gpg \
98
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \
109
&& apt-get -y install --no-install-recommends \
1110
sqlite3 \
@@ -20,7 +19,12 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr
2019
&& rm -rf /var/lib/apt/lists/*
2120

2221
RUN if [ "${NODE_VERSION}" != "none" ]; then \
23-
su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; \
22+
curl -fsSL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \
23+
&& apt-get update \
24+
&& apt-get install -y --no-install-recommends nodejs \
25+
&& rm -rf /var/lib/apt/lists/* \
26+
&& node --version \
27+
&& npm --version; \
2428
fi
2529

26-
USER vscode
30+
USER vscode

0 commit comments

Comments
 (0)