From 89fdd42c803e5cdfc95a89920f885da61ac21ebf Mon Sep 17 00:00:00 2001 From: Isaac Mann Date: Tue, 21 May 2024 18:37:09 -0400 Subject: [PATCH] chore(core): update devcontainer (#23479) Updates the devcontainer so that it has the correct version of pnpm Fixes #20419 --- .devcontainer/Dockerfile | 7 +++++++ .devcontainer/devcontainer.json | 5 ++++- .devcontainer/postCreateCommand.sh | 6 ------ 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000000..43697e3c294b3 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,7 @@ +FROM mcr.microsoft.com/devcontainers/typescript-node:20-bullseye + +# Update the underlying (Debian) OS, to make sure we have the latest security patches and libraries like 'GLIBC' +RUN sudo apt-get update && sudo apt-get -y upgrade + +# Update pnpm +RUN npm install -g pnpm@8.15.7 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7e9d906b54806..8bf448583dd62 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,10 @@ { "name": "NxDevContainer", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:20-bullseye", + "build": { + // Path is relative to the devcontainer.json file. + "dockerfile": "Dockerfile" + }, "features": { "ghcr.io/devcontainers/features/rust:1": {} }, diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index b35481cbadbbb..d408c6b5c51a9 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,11 +1,5 @@ #!/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