diff --git a/Dockerfile b/Dockerfile index 78d4d5798e0..534df270628 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,31 @@ -FROM node:20-alpine AS base +FROM node:18-alpine AS base + +FROM base AS builder + +ENV OPENAI_API_KEY="" +ENV GOOGLE_API_KEY="" +ENV CODE="" # if you located in China, you can use taobao registry to speed up # RUN npm config set registry 'https://registry.npmmirror.com/' RUN npm install -g pnpm@latest-9 -FROM base AS deps - WORKDIR /app COPY .npmrc package.json pnpm-lock.yaml ./ -RUN pnpm install +RUN pnpm install --frozen-lockfile -FROM base AS builder - -ENV OPENAI_API_KEY="" -ENV GOOGLE_API_KEY="" -ENV CODE="" - -WORKDIR /app -COPY --from=deps /app/node_modules ./node_modules COPY . . RUN pnpm build FROM base AS runner + WORKDIR /app -RUN apk add proxychains-ng +RUN apk add --no-cache proxychains-ng ENV PROXY_URL="" ENV OPENAI_API_KEY=""