Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
FROM denoland/deno:latest
|
2 |
|
3 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
4 |
COPY . .
|
5 |
|
6 |
-
#
|
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
|