-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 1018 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (24 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node:20-slim AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /build
RUN npm install -g pnpm@9
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/cli/package.json packages/cli/package.json
COPY packages/core/package.json packages/core/package.json
COPY packages/mcp/package.json packages/mcp/package.json
RUN pnpm install --frozen-lockfile
COPY tsconfig.base.json ./
COPY packages/core/tsconfig.json packages/core/tsconfig.json
COPY packages/core/src packages/core/src
COPY packages/cli/tsconfig.json packages/cli/tsconfig.json
COPY packages/cli/src packages/cli/src
COPY packages/cli/bundle.mjs packages/cli/bundle.mjs
COPY templates ./templates
RUN pnpm --filter @slackwire/core build
RUN pnpm --filter slackwire build
FROM gcr.io/distroless/nodejs20-debian12
WORKDIR /app
COPY --from=builder /build/packages/cli/dist/bundle.cjs ./bundle.cjs
COPY --from=builder /build/packages/cli/dist/templates ./templates
ENTRYPOINT ["/nodejs/bin/node", "/app/bundle.cjs"]