Commit 2f9fabed authored by jaden's avatar jaden

feat: update dockerfile

parent 907203ba
......@@ -5,8 +5,7 @@ FROM node:18
WORKDIR /app
# 复制整个应用到容器中
COPY package*.json ./
COPY pnpm-lock.yaml ./
COPY ./ /app
# 安装依赖
RUN npm i -g pnpm
......@@ -21,9 +20,11 @@ ENV NEXT_PUBLIC_OPEN_AI_API_KEY $NEXT_PUBLIC_OPEN_AI_API_KEY
ARG OPENAI_PROXY_URL
ENV OPENAI_PROXY_URL $OPENAI_PROXY_URL
# 执行构建命令
COPY .next ./.next
COPY public ./public
# 执行构建命令·
RUN pnpm build
RUN find /app -mindepth 1 -maxdepth 1 ! -name '.next' -name '.next' ! -name 'node_modules' -exec rm -rf {} +
COPY package*.json ./
COPY pnpm-lock.yaml ./
# 暴露 3000 端口
EXPOSE 3000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment