Skip to content

Commit

Permalink
fix(repo): update devcontainer.json to use latest Node LTS (20.x.x)… (
Browse files Browse the repository at this point in the history
  • Loading branch information
tinesoft authored Nov 3, 2023
1 parent 96dd3b5 commit 6f8682a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
20 changes: 11 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@
{
"name": "NxDevContainer",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-18",
"image": "mcr.microsoft.com/devcontainers/typescript-node:20-bullseye",
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// 4211 = nx graph port
"forwardPorts": [4211],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm install",
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": ["nrwl.angular-console"]
"extensions": [
"nrwl.angular-console",
"firsttris.vscode-jest-runner",
"eamodio.gitlens"
],
"settings": {
"debug.javascript.autoAttachFilter": "onlyWithFlag" // workaround for that issue: https://github.com/microsoft/vscode-js-debug/issues/374#issuecomment-622239998
}
}
}

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
11 changes: 11 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# Update the underlying (Debian) OS, to make sure we have the latest security patches and libraries like 'GLIBC'
sudo apt-get update && sudo apt-get -y upgrade

# Update pnpm
#npm install -g pnpm

# Install dependencies
pnpm install --frozen-lockfile

4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ graph/client/src/assets/generated-task-graphs
/.env
CODEOWNERS

/.nx/cache
/.nx/cache

.pnpm-store

0 comments on commit 6f8682a

Please sign in to comment.