浏览代码

dockerfile

master
feing 1年前
父节点
当前提交
7bb400b8fc
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      Dockerfile

+ 4
- 2
Dockerfile 查看文件



# 安装依赖 # 安装依赖
RUN npm config set registry https://registry.npmmirror.com RUN npm config set registry https://registry.npmmirror.com
RUN npx vite build
RUN npm install
#RUN npx vite build


# 将项目文件拷贝到工作目录 # 将项目文件拷贝到工作目录
COPY . . COPY . .


# 构建项目 # 构建项目
RUN npm run build
#RUN npm run build
RUN npx vite build


# 暴露端口 # 暴露端口
EXPOSE 3000 EXPOSE 3000

正在加载...
取消
保存