perf: switch to node:20-alpine base images
Docker Build (ARM64) / Build & Push (push) Failing after 5s
Docker Build (ARM64) / Build & Push (push) Failing after 5s
This commit is contained in:
+7
-7
@@ -2,9 +2,9 @@
|
||||
# Builds the MCP server with SQLite persistence
|
||||
|
||||
# Stage 1: Build backend (TypeScript compilation + native modules)
|
||||
FROM node:20-slim AS builder
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -16,12 +16,12 @@ COPY tsconfig.json ./
|
||||
RUN npm run build:server
|
||||
|
||||
# Stage 2: Production MCP Server
|
||||
FROM node:20-slim AS production
|
||||
FROM node:20-alpine AS production
|
||||
|
||||
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
RUN addgroup --system --gid 1001 nodejs && \
|
||||
adduser --system --uid 1001 --gid 1001 nodejs
|
||||
RUN addgroup -S -g 1001 nodejs && \
|
||||
adduser -S -u 1001 -G nodejs nodejs
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -29,7 +29,7 @@ COPY package*.json ./
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev
|
||||
|
||||
# Remove build tools after native modules are compiled
|
||||
RUN apt-get purge -y python3 make g++ && apt-get autoremove -y
|
||||
RUN apk del python3 make g++
|
||||
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user