mirror of
https://github.com/LLM-Red-Team/glm-free-api.git
synced 2024-11-14 14:29:24 +08:00
20 lines
398 B
Docker
20 lines
398 B
Docker
|
FROM node:lts AS BUILD_IMAGE
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY . /app
|
||
|
|
||
|
RUN npm i --registry http://registry.npmmirror.com && npm run build
|
||
|
|
||
|
FROM node:lts-alpine
|
||
|
|
||
|
COPY --from=BUILD_IMAGE /app/configs ./configs
|
||
|
COPY --from=BUILD_IMAGE /app/package.json ./package.json
|
||
|
COPY --from=BUILD_IMAGE /app/dist ./dist
|
||
|
COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
EXPOSE 8000
|
||
|
|
||
|
CMD ["npm", "start"]
|