Charan5775 commited on
Commit
1390ce5
·
verified ·
1 Parent(s): f5a9700

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -3,14 +3,13 @@ FROM ${BASE} AS base
3
 
4
  WORKDIR /app
5
 
6
- # Temporarily switch to root to enable pnpm globally
7
- USER root
8
- RUN corepack enable pnpm
9
 
10
  # Change ownership of the /app directory to the node user
11
  RUN chown -R node:node /app
12
 
13
- # Switch back to the node user
14
  USER node
15
 
16
  # Install dependencies
 
3
 
4
  WORKDIR /app
5
 
6
+ # Install pnpm (preferred: corepack, fallback: npm)
7
+ RUN corepack prepare [email protected] --activate || npm install -g [email protected]
 
8
 
9
  # Change ownership of the /app directory to the node user
10
  RUN chown -R node:node /app
11
 
12
+ # Switch to the node user
13
  USER node
14
 
15
  # Install dependencies