Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions adk/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
version: "3.8"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: version is obsolete and should not be used anymore

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid point. This is a copilot hallucination


services:
adk:
platform: linux/amd64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why does this need to hardcode the platform? What problem is solved by adding it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible its simply just my local environment that's broken.

When I remove 'platform' the build hangs.

docker compose up ─╯

[+] Running 2/2
✔ Container adk-adk-1 Recreate... 2.5s
! adk The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64/v3) and no specific platform was requested 0.0s
Attaching to adk-1, mcp-gateway-1
mcp-gateway-1 | - Reading configuration...
mcp-gateway-1 | - Reading catalog from https://desktop.docker.com/mcp/catalog/v2/catalog.yaml
mcp-gateway-1 | - Configuration read in 55.178129ms
mcp-gateway-1 | - No server is enabled
mcp-gateway-1 | - Listing MCP tools...
mcp-gateway-1 | > 0 tools listed in 11.371µs
mcp-gateway-1 | > Initialized in 56.841104ms
mcp-gateway-1 | > Start sse server on port 8811
adk-1 | exec /entrypoint.sh: exec format error
adk-1 exited with code 255

build:
context: .
ports:
# expose port for web interface
- "8080:8080"
environment:
# point adk at the MCP gateway
# point ADK at the MCP gateway
- MCPGATEWAY_ENDPOINT=http://mcp-gateway:8811/sse
depends_on:
- mcp-gateway
models:
gemma3 :
gemma3:
endpoint_var: MODEL_RUNNER_URL
model_var: MODEL_RUNNER_MODEL

mcp-gateway:
# mcp-gateway secures your MCP servers
image: docker/mcp-gateway:latest
platform: linux/amd64
use_api_socket: true
volumes:
# allow gateway to spin up MCP servers via Docker
- /var/run/docker.sock:/var/run/docker.sock:ro
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: I think this can be safely removed, use_api_socket takes care of mounting the socket.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid point. This is a copilot hallucination

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, that was recently added to compose :-)

# mount your custom MCP configuration
- ./mcp-config.yaml:/app/config.yaml:ro
command:
- --transport=sse
# add any MCP servers you want to use
- --servers=duckduckgo

models:
gemma3:
# pre-pull the model when starting Docker Model Runner
model: ai/gemma3:4B-Q4_0
context_size: 10000 # 3.5 GB VRAM
# increase context size to handle search results
# context_size: 131000 # 7.6 GB VRAM
# context_size: 131000 # 7.6 GB VRAM
19 changes: 19 additions & 0 deletions adk/mcp-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# mcp-config.yaml
hostname: "0.0.0.0"
port: 8811

servers:
duckduckgo:
# explicitly tell the gateway how to run the MCP server
command: docker
args:
- run
- --rm
- -i
- --init
- --security-opt=no-new-privileges
- --cpus=1
- --memory=2Gb
- -e
- DDG_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: I'm not sure if we should get into agent spoofing, but in any case could you please clarify how this environment variable gets used? I cannot find any references to it in https://github.com/nickclyde/duckduckgo-mcp-server - Thanks!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DDG_USER_AGENT is another hallucination. I just tested without it and it works. When I tried to run with mcp-gateway as written it wasn't working for me so this was a best effort to get it to work. :)

mcp-gateway:
# mcp-gateway secures your MCP servers
image: docker/mcp-gateway:latest
use_api_socket: true
command:
- --transport=sse
# add any MCP servers you want to use
- --servers=duckduckgo

- mcp/duckduckgo:latest