nyanya
commited on
Commit
•
0c22978
1
Parent(s):
40094c6
fix npm1
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
@@ -52,8 +52,13 @@ RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/la
|
|
52 |
mkdir -p /app/openvscode-server && \
|
53 |
tar -xzf /tmp/openvscode-server.tar.gz --strip-components=1 -C /app/openvscode-server
|
54 |
|
55 |
-
# Install NVM and set 16 as default
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
# Install Golang
|
59 |
ARG GOLANG_VERSION="1.20"
|
@@ -111,9 +116,7 @@ RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
|
111 |
|
112 |
# NPM Global
|
113 |
RUN --mount=target=/root/npm_packages.txt,source=npm_packages.txt \
|
114 |
-
. "/
|
115 |
-
|
116 |
-
|
117 |
|
118 |
#######################################
|
119 |
# End root user section
|
|
|
52 |
mkdir -p /app/openvscode-server && \
|
53 |
tar -xzf /tmp/openvscode-server.tar.gz --strip-components=1 -C /app/openvscode-server
|
54 |
|
55 |
+
# Install NVM and set 16 as default
|
56 |
+
ENV NVM_DIR /app/.nvm
|
57 |
+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash \
|
58 |
+
&& . "$NVM_DIR/nvm.sh" && nvm install 16 && nvm alias default 16
|
59 |
+
RUN . "$NVM_DIR/nvm.sh" && node -v && which npm
|
60 |
+
|
61 |
+
#RUN mkdir /app/.nvm ; export NVM_DIR="/app/.nvm" && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash && . "$NVM_DIR/nvm.sh" && nvm install 16 && nvm alias default 16
|
62 |
|
63 |
# Install Golang
|
64 |
ARG GOLANG_VERSION="1.20"
|
|
|
116 |
|
117 |
# NPM Global
|
118 |
RUN --mount=target=/root/npm_packages.txt,source=npm_packages.txt \
|
119 |
+
. "$NVM_DIR/nvm.sh" ; nvm use 16 && cat /root/npm_packages.txt | xargs npm install -g
|
|
|
|
|
120 |
|
121 |
#######################################
|
122 |
# End root user section
|