fix: use curl/tar instead of git for downloading source (fixes exit code 127)
Build and Push Docker Image / build (push) Successful in 55s

This commit is contained in:
Daniel Samson committed 2026-10-19 18:13:48 +01:00
1 parent a72cde84c7
commit 941e77bfa0
1 file changed
+9 -10
+9 -10
View File
@@ -2,23 +2,22 @@ FROM node:22-alpine
WORKDIR /app WORKDIR /app
# Install build dependencies # Install curl for downloading source
RUN apk add --no-cache git RUN apk add --no-cache curl tar
# Clone repository into current directory # Download the repository as a tarball and extract
RUN git clone https://github.com/brave/brave-search-mcp-server.git /tmp/brave-mcp && \ RUN curl -L https://github.com/brave/brave-search-mcp-server/archive/refs/heads/main.tar.gz | \
cp -r /tmp/brave-mcp/* . && \ tar xz --strip-components=1
rm -rf /tmp/brave-mcp
# Install dependencies and build # Install dependencies and build
RUN npm ci && npm run build RUN npm ci && npm run build
# Remove git since we don't need it in runtime # Prune dev dependencies
RUN apk del git
# Remove dev dependencies and build artifacts we don't need
RUN npm prune --production RUN npm prune --production
# Remove temporary tools
RUN apk del curl tar
# Expose the MCP server port # Expose the MCP server port
EXPOSE 3000 EXPOSE 3000