# Dockerfile for Cloud MCP Server FROM oven/bun:1 AS base WORKDIR /app # Copy package files COPY package.json bun.lockb* ./ # Install dependencies RUN bun install --frozen-lockfile # Copy source code COPY . . # Build the project RUN bun run build # Production stage FROM oven/bun:1-slim WORKDIR /app # Copy package files and install production dependencies COPY package.json bun.lockb* ./ RUN bun install --frozen-lockfile --production # Copy built files from base stage COPY --from=base /app/dist ./dist COPY --from=base /app/src ./src # Create data directory for persistent storage RUN mkdir -p /app/data # Expose port (if needed for health checks) EXPOSE 3000 # Set environment variables ENV NODE_ENV=production # Run the MCP server CMD ["bun", "run", "src/index.ts"]