docs: notes on docker-compose use
This commit is contained in:
40
README.md
40
README.md
@@ -19,6 +19,8 @@
|
|||||||
- [Installing via PyPI](#installing-via-pypi)
|
- [Installing via PyPI](#installing-via-pypi)
|
||||||
- [Installing via Github repository (latest)](#installing-via-github-repository-latest)
|
- [Installing via Github repository (latest)](#installing-via-github-repository-latest)
|
||||||
- [Installing as container](#installing-as-container)
|
- [Installing as container](#installing-as-container)
|
||||||
|
- [Extending the container image](#extending-the-container-image)
|
||||||
|
- [Docker Compose Setup](#docker-compose-setup)
|
||||||
- [Command line arguments](#command-line-arguments)
|
- [Command line arguments](#command-line-arguments)
|
||||||
- [Testing](#testing)
|
- [Testing](#testing)
|
||||||
|
|
||||||
@@ -180,6 +182,44 @@ Starting from version 0.3.2, it's possible to pull and run the corresponding con
|
|||||||
docker run -t ghcr.io/sparfenyuk/mcp-proxy:v0.3.2-alpine --help
|
docker run -t ghcr.io/sparfenyuk/mcp-proxy:v0.3.2-alpine --help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Extending the container image
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
# file: mcp-proxy.Dockerfile
|
||||||
|
|
||||||
|
FROM ghcr.io/sparfenyuk/mcp-proxy:commit-7eb4a09
|
||||||
|
|
||||||
|
# Install the 'uv' package
|
||||||
|
RUN python3 -m ensurepip && pip install --no-cache-dir uv
|
||||||
|
|
||||||
|
ENV PATH="/usr/local/bin:$PATH" \
|
||||||
|
UV_PYTHON_PREFERENCE=only-system
|
||||||
|
|
||||||
|
ENTRYPOINT [ "mcp-proxy" ]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Docker Compose Setup
|
||||||
|
|
||||||
|
With the custom Dockerfile, you can define a service in your Docker Compose file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
mcp-proxy-custom:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: mcp-proxy.Dockerfile
|
||||||
|
network_mode: host
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 8096:8096
|
||||||
|
command: "--pass-environment --sse-port=8096 --sse-host 0.0.0.0 uvx mcp-server-fetch"
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> 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"
|
||||||
|
|
||||||
## Command line arguments
|
## Command line arguments
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ classifiers = [
|
|||||||
"Topic :: Utilities",
|
"Topic :: Utilities",
|
||||||
"Typing :: Typed",
|
"Typing :: Typed",
|
||||||
]
|
]
|
||||||
version = "0.4.1"
|
version = "0.5.0"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
dependencies = ["mcp>=1.2.0,<2", "uvicorn>=0.34.0"]
|
dependencies = ["mcp>=1.2.0,<2", "uvicorn>=0.34.0"]
|
||||||
|
|
||||||
|
|||||||
3
uv.lock
generated
3
uv.lock
generated
@@ -1,4 +1,5 @@
|
|||||||
version = 1
|
version = 1
|
||||||
|
revision = 1
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -208,7 +209,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mcp-proxy"
|
name = "mcp-proxy"
|
||||||
version = "0.4.1"
|
version = "0.5.0"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "mcp" },
|
{ name = "mcp" },
|
||||||
|
|||||||
Reference in New Issue
Block a user