Skip to content

Commit 657a46c

Browse files
committed
chore(docker): install global npm packages as root and update Yarn to 4.9.0
1 parent 713de50 commit 657a46c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

node22/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ RUN addgroup -g ${USER_ID} csdev; \
2323
## Enable Yarn 4
2424
RUN corepack enable
2525

26+
## Install global packages (as root before switching user)
27+
RUN npm install -g sass
28+
2629
USER csdev
2730

2831
RUN echo Y | yarn -v
2932
RUN corepack prepare yarn@4.8.1 --activate
3033

31-
## Install Sass (use npm since Yarn 4 doesn't support global add)
32-
RUN npm install -g sass
33-
3434
WORKDIR /var/dev
3535

3636
CMD ["ash", "-l"]

node24/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ RUN addgroup -g ${USER_ID} csdev; \
2323
## Enable Yarn 4
2424
RUN corepack enable
2525

26+
## Install global packages (as root before switching user)
27+
RUN npm install -g sass
28+
2629
USER csdev
2730

2831
RUN echo Y | yarn -v
2932
RUN corepack prepare yarn@4.9.0 --activate
3033

31-
## Install Sass (use npm since Yarn 4 doesn't support global add)
32-
RUN npm install -g sass
33-
3434
WORKDIR /var/dev
3535

3636
CMD ["ash", "-l"]

0 commit comments

Comments
 (0)