mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-18 08:13:24 +02:00
26 lines
659 B
Docker
26 lines
659 B
Docker
FROM node:22.12-alpine as builder
|
|
|
|
# Must be entire project because `prepare` script is run during `npm install` and requires all files.
|
|
COPY src/slack /app
|
|
COPY tsconfig.json /tsconfig.json
|
|
|
|
WORKDIR /app
|
|
|
|
RUN --mount=type=cache,target=/root/.npm npm install
|
|
|
|
RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev
|
|
|
|
FROM node:22-alpine AS release
|
|
|
|
COPY --from=builder /app/dist /app/dist
|
|
COPY --from=builder /app/package.json /app/package.json
|
|
COPY --from=builder /app/package-lock.json /app/package-lock.json
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
WORKDIR /app
|
|
|
|
RUN npm ci --ignore-scripts --omit-dev
|
|
|
|
ENTRYPOINT ["node", "dist/index.js"]
|