Update Dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
@@ -2,6 +2,12 @@
|
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
# 使用多阶段构建
|
6 |
# 阶段 1:构建前端
|
7 |
FROM node:16 AS frontend-build
|
|
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
|
5 |
+
# 安装前清理缓存
|
6 |
+
RUN npm cache clean --force
|
7 |
+
RUN npm install
|
8 |
+
RUN npm run build
|
9 |
+
|
10 |
+
|
11 |
# 使用多阶段构建
|
12 |
# 阶段 1:构建前端
|
13 |
FROM node:16 AS frontend-build
|