coyotte508 HF staff commited on
Commit
ff2db2e
1 Parent(s): 293ff91

⚡️ Improve docker incremental build time (#142)

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -7,10 +7,12 @@ RUN npm install -g pm2
7
 
8
  WORKDIR /app
9
 
10
- COPY --link --chown=1000 . .
11
 
12
  RUN npm i
13
 
 
 
14
  RUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.local npm run build
15
 
16
  CMD pm2 start build/index.js -i $CPU_CORES --no-daemon
 
7
 
8
  WORKDIR /app
9
 
10
+ COPY --link --chown=1000 package.json package-lock.json ./
11
 
12
  RUN npm i
13
 
14
+ COPY --link --chown=1000 . .
15
+
16
  RUN --mount=type=secret,id=DOTENV_LOCAL,dst=.env.local npm run build
17
 
18
  CMD pm2 start build/index.js -i $CPU_CORES --no-daemon