Skip to content

Commit 78783f3

Browse files
committed
docs: notes on docker-compose use
1 parent 209268a commit 78783f3

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
- [Installing via PyPI](#installing-via-pypi)
2020
- [Installing via Github repository (latest)](#installing-via-github-repository-latest)
2121
- [Installing as container](#installing-as-container)
22+
- [Extending the container image](#extending-the-container-image)
23+
- [Docker Compose Setup](#docker-compose-setup)
2224
- [Command line arguments](#command-line-arguments)
2325
- [Testing](#testing)
2426

@@ -180,6 +182,44 @@ Starting from version 0.3.2, it's possible to pull and run the corresponding con
180182
docker run -t ghcr.io/sparfenyuk/mcp-proxy:v0.3.2-alpine --help
181183
```
182184

185+
## Extending the container image
186+
187+
You can extend the `mcp-proxy` container image to include additional executables. For instance, `uv` is not included by default, but you can create a custom image with it:
188+
189+
```Dockerfile
190+
# file: mcp-proxy.Dockerfile
191+
192+
FROM ghcr.io/sparfenyuk/mcp-proxy:commit-7eb4a09
193+
194+
# Install the 'uv' package
195+
RUN python3 -m ensurepip && pip install --no-cache-dir uv
196+
197+
ENV PATH="/usr/local/bin:$PATH" \
198+
UV_PYTHON_PREFERENCE=only-system
199+
200+
ENTRYPOINT [ "mcp-proxy" ]
201+
```
202+
203+
## Docker Compose Setup
204+
205+
With the custom Dockerfile, you can define a service in your Docker Compose file:
206+
207+
```yaml
208+
services:
209+
mcp-proxy-custom:
210+
build:
211+
context: .
212+
dockerfile: mcp-proxy.Dockerfile
213+
network_mode: host
214+
restart: unless-stopped
215+
ports:
216+
- 8096:8096
217+
command: "--pass-environment --sse-port=8096 --sse-host 0.0.0.0 uvx mcp-server-fetch"
218+
```
219+
220+
> [!NOTE]
221+
> Don't forget to set `--pass-environment` argument, otherwise you'll end up with the error "No interpreter found in managed installations or search path"
222+
183223
## Command line arguments
184224

185225
```bash

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ classifiers = [
2525
"Topic :: Utilities",
2626
"Typing :: Typed",
2727
]
28-
version = "0.4.1"
28+
version = "0.5.0"
2929
requires-python = ">=3.10"
3030
dependencies = ["mcp>=1.2.0,<2", "uvicorn>=0.34.0"]
3131

uv.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)