From 941e77bfa070eef79748c90a4aa6c261035475f9 Mon Sep 17 00:00:00 2001 From: Daniel Samson <12231216+daniel-samson@users.noreply.github.com> Date: Mon, 19 Oct 2026 18:13:48 +0100 Subject: [PATCH] fix: use curl/tar instead of git for downloading source (fixes exit code 127) --- Dockerfile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) 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