Skip to content

Commit bb60b8c

Browse files
committed
fix: switched from installing node manually to using an image for it
1 parent 29863a2 commit bb60b8c

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
# Argument for the pnpm version to install
2-
ARG PNPM_VERSION="8.6.12"
2+
ARG PNPM_VERSION="latest"
33
# Which image to use as a base
4-
ARG IMAGE="mcr.microsoft.com/vscode/devcontainers/base"
4+
ARG IMAGE="mcr.microsoft.com/devcontainers/javascript-node"
55
# Which tag to use for the image
6-
ARG VARIANT="1-ubuntu-22.04"
7-
# Argument for the Node.js version to install along with npm, yarn and pnpm
8-
ARG NODE_VERSION="20"
6+
ARG VARIANT="20-bookworm"
97

108
# Arguments related to setting up a non-root user for the container
11-
ARG USERNAME=vscode
12-
ARG USER_UID=1000
13-
ARG USER_GID=$USER_UID
9+
ARG USERNAME=node
1410

1511
#########################
1612
# Final image
@@ -19,10 +15,7 @@ FROM ${IMAGE}:${VARIANT}
1915

2016
# Make sure arguments are available
2117
ARG PNPM_VERSION
22-
ARG NODE_VERSION
2318
ARG USERNAME
24-
ARG USER_UID
25-
ARG USER_GID
2619

2720
RUN apt update \
2821
# Upgrade the system
@@ -32,10 +25,7 @@ RUN apt update \
3225
git git-lfs bash-completion curl wget \
3326
# Update ca-certificates
3427
&& update-ca-certificates \
35-
# Install Node.js
36-
&& curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash -E - \
37-
&& apt update \
38-
&& apt install -yq nodejs \
28+
# Install package managers
3929
&& npm i -g npm \
4030
&& npm i -g yarn \
4131
&& npm i -g pnpm@${PNPM_VERSION} \

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323
"astro-build.astro-vscode" // Astro
2424
]
2525
},
26-
"remoteUser": "vscode", // The name of the non-root user in the container
2726
"features": {}
2827
}

0 commit comments

Comments
 (0)