Fix: Pass secret values directly in Docker -e arguments for standalone deployments#338
Open
kimwwk wants to merge 1 commit into
Open
Fix: Pass secret values directly in Docker -e arguments for standalone deployments#338kimwwk wants to merge 1 commit into
kimwwk wants to merge 1 commit into
Conversation
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>
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? |
Author
|
Happy to hear that! I am just using a secret file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Quick fix for standalone users running MCP Gateway without Docker Desktop.
When using Docker over a socket,
-e VARNAMElooks 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=valuewhen secrets are available.Test plan