Files
brave-search-mcp-server/Dockerfile
T
Daniel Samson 678c84ebd3
Build and Push Docker Image / build (push) Successful in 55s
fix: ensure dev dependencies available during build before pruning
2026-10-19 18:33:13 +01:00

29 lines
624 B
Docker

FROM node:22-alpine
WORKDIR /app
# Install curl for downloading source
RUN apk add --no-cache curl tar
# Download the repository as a tarball and extract
RUN curl -L https://github.com/brave/brave-search-mcp-server/archive/refs/heads/main.tar.gz | \
tar xz --strip-components=1
# Install ALL dependencies (including dev deps needed for build)
RUN npm ci
# Build the project
RUN npm run build
# Now prune dev dependencies
RUN npm prune --production
# Remove temporary tools
RUN apk del curl tar
# Expose the MCP server port
EXPOSE 3000
# Start the MCP server with HTTP transport
CMD ["npm", "run", "serve:http"]