diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index beb3d81..ee40aa9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,8 +18,7 @@ jobs: - postgresql-client - shellcheck baseImage: - - debian:latest - - ubuntu:latest + - mcr.microsoft.com/devcontainers/base:debian - mcr.microsoft.com/devcontainers/base:ubuntu continue-on-error: true steps: diff --git a/src/node/devcontainer-feature.json b/src/node/devcontainer-feature.json index 28f628d..53c7448 100644 --- a/src/node/devcontainer-feature.json +++ b/src/node/devcontainer-feature.json @@ -1,7 +1,7 @@ { "name": "Node.js", "id": "node", - "version": "1.0.0", + "version": "1.1.0", "description": "Install Node.js from Nodesource's DEB repository.", "options": { "version": { @@ -17,7 +17,23 @@ "description": "Select or enter a Node.js version." } }, + "containerEnv": { + "NPM_CONFIG_CACHE": "/usr/local/npm" + }, "installsAfter": [ "ghcr.io/devcontainers/features/common-utils" - ] + ], + "mounts": [ + { + "source": "npm-cache", + "target": "/usr/local/npm", + "type": "volume" + }, + { + "source": "node_modules-cache", + "target": "${containerWorkspaceFolder}/node_modules", + "type": "volume" + } + ], + "postCreateCommand": "sudo chown -R ${USER}:${USER} /usr/local/npm ${containerWorkspaceFolder}/node_modules" } diff --git a/test/node/scenarios.json b/test/node/scenarios.json index 469f26f..7730fb1 100644 --- a/test/node/scenarios.json +++ b/test/node/scenarios.json @@ -1,6 +1,6 @@ { "node-20": { - "image": "debian:latest", + "image": "mcr.microsoft.com/devcontainers/base:debian", "features": { "node": { "version": "20"