|
19 | 19 | - [Installing via PyPI](#installing-via-pypi)
|
20 | 20 | - [Installing via Github repository (latest)](#installing-via-github-repository-latest)
|
21 | 21 | - [Installing as container](#installing-as-container)
|
| 22 | + - [Extending the container image](#extending-the-container-image) |
| 23 | + - [Docker Compose Setup](#docker-compose-setup) |
22 | 24 | - [Command line arguments](#command-line-arguments)
|
23 | 25 | - [Testing](#testing)
|
24 | 26 |
|
@@ -180,6 +182,44 @@ Starting from version 0.3.2, it's possible to pull and run the corresponding con
|
180 | 182 | docker run -t ghcr.io/sparfenyuk/mcp-proxy:v0.3.2-alpine --help
|
181 | 183 | ```
|
182 | 184 |
|
| 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 | + |
183 | 223 | ## Command line arguments
|
184 | 224 |
|
185 | 225 | ```bash
|
|
0 commit comments