mfoud444 commited on
Commit
3268a20
·
verified ·
1 Parent(s): 9e3f559

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -1,21 +1,23 @@
1
  FROM node:lts-alpine
2
 
 
3
  RUN apk add --no-cache git bash
4
 
 
5
  WORKDIR /app
6
 
 
7
  RUN git clone --depth=1 --branch stable https://github.com/stackblitz-labs/bolt.diy.git .
8
 
9
- # Fix ownership
10
  RUN chown -R node:node /app
11
 
12
- # Use existing non-root user
13
  USER node
14
 
15
- # Use corepack to activate pnpm
16
- RUN corepack enable && corepack prepare pnpm@latest --activate
17
-
18
- RUN pnpm install
19
 
20
  EXPOSE 7860
21
- CMD ["pnpm", "run", "dev", "-p", "7860"]
 
 
1
  FROM node:lts-alpine
2
 
3
+ # Install git and bash
4
  RUN apk add --no-cache git bash
5
 
6
+ # Set working directory
7
  WORKDIR /app
8
 
9
+ # Clone the repo
10
  RUN git clone --depth=1 --branch stable https://github.com/stackblitz-labs/bolt.diy.git .
11
 
12
+ # Change ownership of /app to the default non-root user "node"
13
  RUN chown -R node:node /app
14
 
15
+ # Switch to the non-root user
16
  USER node
17
 
18
+ # Use npx to install dependencies and run dev server
19
+ RUN npx --yes pnpm install
 
 
20
 
21
  EXPOSE 7860
22
+
23
+ CMD ["npx", "--yes", "pnpm", "run", "dev", "-p", "7860"]