Skip to content

Commit 25c777c

Browse files
committed
install node
1 parent cf05322 commit 25c777c

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,17 @@ RUN bash -c 'set -euo pipefail && \
99
install -m 755 /tmp/leeway /usr/local/bin/ && \
1010
rm /tmp/leeway.tar.gz /tmp/leeway'
1111

12+
# Install Node.js
13+
ENV NODE_MAJOR=20
14+
ADD https://raw.githubusercontent.com/gitpod-io/workspace-images/main/base/install-packages /usr/bin/install-packages
15+
RUN chmod +x /usr/bin/install-packages
16+
RUN mkdir -p /etc/apt/keyrings && \
17+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
18+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \
19+
install-packages nodejs && \
20+
rm -rf /usr/include/node/openssl/archs/{aix64-gcc-as,BSD-x86,BSD-x86_64,darwin64-arm64-cc,darwin64-x86_64-cc,darwin-i386-cc,linux32-s390x,linux64-loongarch64,linux64-mips64,linux64-riscv64,linux64-s390x,linux-armv4,linux-ppc64le,solaris64-x86_64-gcc,solaris-x86-gcc,VC-WIN32} && \
21+
rm -rf /usr/share/doc/nodejs && \
22+
rm -rf ./.npm/_cacache
23+
1224
# Install claude-code globally
1325
RUN npm i -g @anthropic-ai/claude-code

.devcontainer/devcontainer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
"dockerfile": "Dockerfile"
55
},
66
"features": {
7-
"ghcr.io/devcontainers/features/node:1": {
8-
"version": "18"
9-
},
107
"ghcr.io/devcontainers/features/go:1": {
118
"version": "1.24"
129
},
1310
"ghcr.io/devcontainers/features/common-utils:2": {},
1411
"ghcr.io/dhoeric/features/google-cloud-cli:1": {},
1512
"ghcr.io/devcontainers/features/aws-cli:1": {}
1613
},
17-
"forwardPorts": [8080, 3000, 9000],
14+
"forwardPorts": [
15+
8080,
16+
3000,
17+
9000
18+
],
1819
"portsAttributes": {
1920
"8080": {
2021
"label": "Application Server",
@@ -29,4 +30,4 @@
2930
"onAutoForward": "notify"
3031
}
3132
}
32-
}
33+
}

0 commit comments

Comments
 (0)