Skip to content

Commit fdb081f

Browse files
committed
Update websocket node image for GLIBC
1 parent 24b417d commit fdb081f

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

apps/websocket/Dockerfile

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,25 @@
1-
FROM node:20-alpine AS base
1+
FROM node:20-bookworm-slim AS base
22

33
FROM 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
84
WORKDIR /app
5+
96
RUN npm install turbo --global
107
COPY . .
118
RUN turbo prune @sr24/websocket --docker
129

13-
# Add lockfile and package.json's of isolated subworkspace
1410
FROM base AS installer
15-
RUN apk update
16-
RUN apk add --no-cache libc6-compat
1711
WORKDIR /app
1812

19-
# First install dependencies (as they change less often)
2013
COPY --from=builder /app/out/json/ .
2114
RUN npm install
2215

23-
# Build the project and its dependencies
2416
COPY --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-
3317
RUN npm run build
3418

3519
FROM base AS runner
3620
WORKDIR /app
37-
3821
ENV NODE_ENV=production
3922

40-
# Copy only the compiled files and dependencies
4123
COPY --from=installer /app .
42-
43-
# Expose port if needed
4424
EXPOSE 3002
45-
46-
CMD ["node", "apps/websocket/dist/index.js"]
25+
CMD ["node", "apps/websocket/dist/index.js"]

0 commit comments

Comments
 (0)