gaza/Dockerfile
Ubuntu fbcc342c5f 定义标准协议 TypeScript 数据模型
Co-authored-by: multica-agent <github@multica.ai>
2026-08-03 19:05:26 +00:00

24 lines
570 B
Docker

FROM node:22.18.0-alpine3.22 AS dependencies
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --ignore-scripts
FROM dependencies AS test
COPY tsconfig.json tsconfig.build.json ./
COPY src ./src
COPY test ./test
CMD ["npm", "test"]
FROM dependencies AS build
COPY tsconfig.json tsconfig.build.json ./
COPY src ./src
RUN npm run build
FROM node:22.18.0-alpine3.22 AS production
WORKDIR /app
ENV NODE_ENV=production
COPY package.json ./
COPY --from=build /app/dist ./dist
USER node
CMD ["node", "--input-type=module", "--eval", "import('@gaza/protocol')"]