fxlinux commited on
Commit
dfb7d54
·
verified ·
1 Parent(s): 33dfb01

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -1
Dockerfile CHANGED
@@ -1,9 +1,13 @@
1
  FROM denoland/deno:latest
2
 
3
  WORKDIR /app
 
 
 
 
4
  COPY . .
5
 
6
- # 清理任何现有的 node_modules 或缓存目录,以防止符号链接冲突
7
  RUN rm -rf node_modules /app/node_modules/.deno
8
 
9
  RUN deno cache --node-modules-dir main.ts
 
1
  FROM denoland/deno:latest
2
 
3
  WORKDIR /app
4
+
5
+ # 在复制文件之前就进行清理,确保一个非常干净的环境
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