Skip to content

Commit

Permalink
feat: DevContainerにpnpmをインストールする際、corepackを使うようにする (#13821)
Browse files Browse the repository at this point in the history
  • Loading branch information
frfs authored May 13, 2024
1 parent f6af6d9 commit 12ae9a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
"service": "app",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers-contrib/features/pnpm:2": {
"version": "8.9.2"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "20.12.2"
}
},
"ghcr.io/devcontainers-contrib/features/corepack:1": {}
},
"forwardPorts": [3000],
"postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh",
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -xe

sudo chown -R node /workspace
git submodule update --init
corepack install
corepack enable
pnpm config set store-dir /home/node/.local/share/pnpm/store
pnpm install --frozen-lockfile
cp .devcontainer/devcontainer.yml .config/default.yml
Expand Down

0 comments on commit 12ae9a2

Please sign in to comment.