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
# 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