Compare commits
2 Commits
80824c0381
...
be4eef6fd1
| Author | SHA1 | Date | |
|---|---|---|---|
| be4eef6fd1 | |||
| ec6e238356 |
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM node:18
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
|
||||||
|
COPY . .
|
||||||
17
Dockerfile.frontend
Normal file
17
Dockerfile.frontend
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# 使用官方的 Node.js 镜像作为基础镜像
|
||||||
|
FROM node:18
|
||||||
|
|
||||||
|
# 设置工作目录
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 复制 package.json 和 package-lock.json(如果存在)到工作目录
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
# 安装项目依赖
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# 复制项目文件到工作目录
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# 构建项目
|
||||||
|
RUN npm run build
|
||||||
Loading…
Reference in New Issue
Block a user