fxlinux commited on
Commit
4b8300f
·
verified ·
1 Parent(s): 05f52ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -6,11 +6,15 @@ WORKDIR /app
6
  RUN rm -rf /app/node_modules /app/node_modules/.deno /deno-dir
7
 
8
  COPY . .
 
 
 
9
 
 
 
10
  # 再次清理,以防万一(虽然通常前面的清理已足够)
11
- RUN rm -rf node_modules /app/node_modules/.deno
12
-
13
- RUN deno cache --node-modules-dir main.ts
14
 
15
  EXPOSE 8000
16
 
 
6
  RUN rm -rf /app/node_modules /app/node_modules/.deno /deno-dir
7
 
8
  COPY . .
9
+ # 设置环境变量
10
+ ENV DENO_NO_UPDATE_CHECK=1
11
+ ENV DENO_NO_PROMPT=1
12
 
13
+ # 确保清理任何现有的 node_modules
14
+ RUN rm -rf node_modules .deno 2>/dev/null || true
15
  # 再次清理,以防万一(虽然通常前面的清理已足够)
16
+ # 缓存依赖项
17
+ RUN deno cache --reload --quiet main.ts
 
18
 
19
  EXPOSE 8000
20