glm-free-api/Dockerfile

21 lines
468 B
Docker
Raw Normal View History

2024-03-17 15:56:53 +08:00
FROM node:lts AS BUILD_IMAGE
WORKDIR /app
COPY . /app
2024-04-11 15:04:44 +08:00
RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build
2024-03-17 15:56:53 +08:00
FROM node:lts-alpine
2024-04-10 18:40:59 +08:00
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
2024-03-17 15:56:53 +08:00
WORKDIR /app
EXPOSE 8000
CMD ["npm", "start"]