Skip to content

Commit 37b58ff

Browse files
committed
init dockerfile
1 parent 75abdee commit 37b58ff

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
"ghcr.io/devcontainers/features/git:1": {}
2727
},
2828
"postCreateCommand": "npm install",
29-
"remoteUser": "node"
29+
"remoteUser": "node",
30+
"postStartCommand": "npm install -g @vscode/vsce"
3031
}

Dockerfile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,5 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
88
&& apt-get clean -y \
99
&& rm -rf /var/lib/apt/lists/*
1010

11-
# Switch to non-root user for npm global installs
12-
USER node
13-
14-
# Install global node packages
15-
RUN npm install -g @vscode/vsce@latest yo@latest generator-code@latest \
16-
&& npm cache clean --force
17-
18-
# Verify installations
19-
RUN echo "Verifying installations..." \
20-
&& vsce --version \
21-
&& yo --version \
22-
&& which generator-code
11+
# Switch to non-root user for npm operations
12+
USER node

0 commit comments

Comments
 (0)