diff --git a/Dockerfile b/Dockerfile index e3d6914..cfebabe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,23 +2,22 @@ FROM node:22-alpine WORKDIR /app -# Install build dependencies -RUN apk add --no-cache git +# Install curl for downloading source +RUN apk add --no-cache curl tar -# Clone repository into current directory -RUN git clone https://github.com/brave/brave-search-mcp-server.git /tmp/brave-mcp && \ - cp -r /tmp/brave-mcp/* . && \ - rm -rf /tmp/brave-mcp +# 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 dependencies and build RUN npm ci && npm run build -# Remove git since we don't need it in runtime -RUN apk del git - -# Remove dev dependencies and build artifacts we don't need +# Prune dev dependencies RUN npm prune --production +# Remove temporary tools +RUN apk del curl tar + # Expose the MCP server port EXPOSE 3000