File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed
Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff line change 1- FROM node:20-alpine AS base
1+ FROM node:20-bookworm-slim AS base
22
33FROM base AS builder
4- # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
5- RUN apk update
6- RUN apk add --no-cache libc6-compat
7- # Set working directory
84WORKDIR /app
5+
96RUN npm install turbo --global
107COPY . .
118RUN turbo prune @sr24/websocket --docker
129
13- # Add lockfile and package.json's of isolated subworkspace
1410FROM base AS installer
15- RUN apk update
16- RUN apk add --no-cache libc6-compat
1711WORKDIR /app
1812
19- # First install dependencies (as they change less often)
2013COPY --from=builder /app/out/json/ .
2114RUN npm install
2215
23- # Build the project and its dependencies
2416COPY --from=builder /app/out/full/ .
25-
26- # Uncomment and use build args to enable remote caching
27- # ARG TURBO_TEAM
28- # ENV TURBO_TEAM=$TURBO_TEAM
29-
30- # ARG TURBO_TOKEN
31- # ENV TURBO_TOKEN=$TURBO_TOKEN
32-
3317RUN npm run build
3418
3519FROM base AS runner
3620WORKDIR /app
37-
3821ENV NODE_ENV=production
3922
40- # Copy only the compiled files and dependencies
4123COPY --from=installer /app .
42-
43- # Expose port if needed
4424EXPOSE 3002
45-
46- CMD ["node" , "apps/websocket/dist/index.js" ]
25+ CMD ["node" , "apps/websocket/dist/index.js" ]
You can’t perform that action at this time.
0 commit comments