Skip to content

Fix: Pass secret values directly in Docker -e arguments for standalone deployments#338

Open
kimwwk wants to merge 1 commit into
docker:mainfrom
kimwwk:fix/docker-socket-secrets
Open

Fix: Pass secret values directly in Docker -e arguments for standalone deployments#338
kimwwk wants to merge 1 commit into
docker:mainfrom
kimwwk:fix/docker-socket-secrets

Conversation

@kimwwk

@kimwwk kimwwk commented Jan 13, 2026

Copy link
Copy Markdown

Summary

Quick fix for standalone users running MCP Gateway without Docker Desktop.

When using Docker over a socket, -e VARNAME looks up the variable in the Docker daemon's environment, not the caller's. This causes secrets to not be passed to spawned MCP server containers in standalone deployments.

Fix: Pass values directly as -e VARNAME=value when secrets are available.

Test plan

  • Tested with Pinecone MCP server in standalone Docker deployment
  • Verified secrets are correctly passed to spawned containers
  • Confirmed MCP tool calls succeed with proper authentication

When using Docker over a socket (e.g., standalone deployments without
Docker Desktop), the -e VARNAME syntax looks up the variable in the
Docker daemon's environment, not the caller's environment. This causes
secrets to not be passed to spawned MCP server containers.

Changed to use -e VARNAME=value when the secret is available, which
directly passes the value to the container regardless of the Docker
daemon's environment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@kimwwk kimwwk requested a review from a team as a code owner January 13, 2026 03:51
@slimslenderslacks

Copy link
Copy Markdown
Collaborator

@kimwwk we are now starting to work on a standalone version of MCP gateway that does not rely on DockerDesktop. In your environment, how are you setting the values of the secrets?

@kimwwk

kimwwk commented Feb 4, 2026

Copy link
Copy Markdown
Author

Happy to hear that! I am just using a secret file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants