Skip to content

Add named Docker containers for upstream servers#54

Merged
Dumbris merged 1 commit into
mainfrom
feature/docker-names
Sep 9, 2025
Merged

Add named Docker containers for upstream servers#54
Dumbris merged 1 commit into
mainfrom
feature/docker-names

Conversation

@Dumbris

@Dumbris Dumbris commented Sep 9, 2025

Copy link
Copy Markdown
Member

Summary

Implements container naming that includes upstream server names to improve visibility and debugging in Docker Desktop and CLI tools.

Changes

  • Container names follow pattern: mcpproxy-{sanitizedServerName}-{4randomChars}
  • Random 4-character suffix prevents conflicts between servers
  • Server names are sanitized to comply with Docker naming rules
  • Enhanced cleanup logic uses name patterns as primary method
  • Fallback to existing image-based cleanup for compatibility
  • Added comprehensive unit tests for naming and sanitization

Benefits

  • Easy identification of containers by upstream server name in Docker Desktop
  • Better debugging experience when troubleshooting container issues
  • Maintains existing cleanup and isolation functionality
  • Backward compatible with existing cidfile tracking

Example

Container names are now visible as mcpproxy-github-server-a1b2 instead of generic Docker-generated names, making it easy to identify which containers belong to which upstream servers.

Test plan

  • Unit tests added for container name generation and sanitization
  • All existing tests pass
  • Linter passes with no issues
  • Manual testing with various server name formats (spaces, special chars)
  • Verified cleanup works with named containers

Implements container naming that includes upstream server names
to improve visibility and debugging in Docker Desktop and CLI.

Changes:
- Container names follow pattern: mcpproxy-{sanitizedServerName}-{4randomChars}
- Random 4-character suffix prevents conflicts between servers
- Server names are sanitized to comply with Docker naming rules
- Enhanced cleanup logic uses name patterns as primary method
- Fallback to existing image-based cleanup for compatibility
- Added comprehensive unit tests for naming and sanitization
- All linting issues resolved

Container names are now visible as "mcpproxy-github-server-a1b2"
instead of generic Docker-generated names, making it easier to
identify which containers belong to which upstream servers.
@Dumbris
Dumbris merged commit feecf78 into main Sep 9, 2025
33 checks passed
@Dumbris
Dumbris deleted the feature/docker-names branch September 9, 2025 18:49
rannow pushed a commit to rannow/mcpproxy-go that referenced this pull request Sep 23, 2025
…cker-names

Add named Docker containers for upstream servers
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.

1 participant