Bot commited on
Commit
8a5d485
·
1 Parent(s): 1870e0e

Build loop-engineering in builder stage to fix tsc not found error

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -5
Dockerfile CHANGED
@@ -2,6 +2,15 @@ FROM node:23-alpine AS builder
2
  ARG DOCKER_BUILD="1"
3
  WORKDIR /app
4
 
 
 
 
 
 
 
 
 
 
5
  COPY . .
6
 
7
  # Install pnpm
@@ -32,11 +41,8 @@ ENV NEXT_TELEMETRY_DISABLED=1
32
 
33
  RUN apk add --no-cache git bash
34
 
35
- # Clone and build loop-engineering MCP server permanently in the image
36
- RUN git clone https://github.com/cobusgreyling/loop-engineering.git /app/loop-engineering && \
37
- cd /app/loop-engineering/tools/mcp-server && \
38
- npm install && \
39
- npm run build
40
 
41
  RUN addgroup --system --gid 1001 nodejs
42
  RUN adduser --system --uid 1001 nextjs
 
2
  ARG DOCKER_BUILD="1"
3
  WORKDIR /app
4
 
5
+ # Install git to clone loop-engineering
6
+ RUN apk add --no-cache git
7
+
8
+ # Clone and build loop-engineering MCP server
9
+ RUN git clone https://github.com/cobusgreyling/loop-engineering.git /app/loop-engineering && \
10
+ cd /app/loop-engineering/tools/mcp-server && \
11
+ npm install && \
12
+ npm run build
13
+
14
  COPY . .
15
 
16
  # Install pnpm
 
41
 
42
  RUN apk add --no-cache git bash
43
 
44
+ # Copy pre-built loop-engineering from builder stage
45
+ COPY --from=builder /app/loop-engineering /app/loop-engineering
 
 
 
46
 
47
  RUN addgroup --system --gid 1001 nodejs
48
  RUN adduser --system --uid 1001 nextjs