glm / Dockerfile
kingtest's picture
Create Dockerfile
5dc8857 verified
raw
history blame
577 Bytes
FROM node:lts AS BUILD_IMAGE
WORKDIR /app
RUN apk add --no-cache git && \
git clone https://github.com/LLM-Red-Team/glm-free-api.git /app && \
apk del git
RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
FROM node:lts-alpine
COPY --from=BUILD_IMAGE /app/configs /app/configs
COPY --from=BUILD_IMAGE /app/package.json /app/package.json
COPY --from=BUILD_IMAGE /app/dist /app/dist
COPY --from=BUILD_IMAGE /app/public /app/public
COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules
WORKDIR /app
EXPOSE 8000
CMD ["npm", "start"]