Skip to content

Commit 4fa1c47

Browse files
Update fetch Docker to not have ux in final stage
1 parent f630294 commit 4fa1c47

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/fetch/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use a Python image with uv pre-installed
2-
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
2+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
33

44
# Install the project into `/app`
55
WORKDIR /app
@@ -14,16 +14,23 @@ ENV UV_LINK_MODE=copy
1414
RUN --mount=type=cache,target=/root/.cache/uv \
1515
--mount=type=bind,source=uv.lock,target=uv.lock \
1616
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17-
uv sync --frozen --no-install-project --no-dev
17+
uv sync --frozen --no-install-project --no-dev --no-editable
1818

1919
# Then, add the rest of the project source code and install it
2020
# Installing separately from its dependencies allows optimal layer caching
2121
ADD . /app
2222
RUN --mount=type=cache,target=/root/.cache/uv \
23-
uv sync --frozen --no-dev
23+
uv sync --frozen --no-dev --no-editable
24+
25+
FROM python:3.12-slim-bookworm
26+
27+
WORKDIR /app
28+
29+
COPY --from=uv /root/.local /root/.local
30+
COPY --from=uv --chown=app:app /app/.venv /app/.venv
2431

2532
# Place executables in the environment at the front of the path
2633
ENV PATH="/app/.venv/bin:$PATH"
2734

2835
# when running the container, add --db-path and a bind mount to the host's db file
29-
ENTRYPOINT ["uvx" , "mcp-server-fetch"]
36+
ENTRYPOINT ["mcp-server-fetch"]

src/git/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ Add this to your `claude_desktop_config.json`:
123123
<details>
124124
<summary>Using docker</summary>
125125

126+
* Note: replace '/Users/username' with the a path that you want to be accessible by this tool
127+
126128
```json
127129
"mcpServers": {
128130
"git": {
129131
"command": "docker",
130-
"args": ["run", "--rm", "-i", "--mount", "type=bind,src=/Users/username,dst=/projects", "mcp/git"]
132+
"args": ["run", "--rm", "-i", "--mount", "type=bind,src=/Users/username,dst=/Users/username", "mcp/git"]
131133
}
132134
}
133135
```

0 commit comments

Comments
 (0)