Auto-detect and suggest `expose` ports from docker-compose files in `Container Port configuration`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
Currently, users must manually enter container ports when configuring domains, which can lead to:
- Security risks: Users may inadvertently use
portsvalues that expose services to the entire host - Configuration errors: Manual port entry increases chances of typos and mismatched ports
- Poor UX: No guidance on which ports are actually available in the container
- Inconsistent practices: No encouragement to follow Docker security best practices
Describe the solution you'd like
Auto-detection of expose directive:
- Parse docker-compose.yml files to extract
exposeport values - Display detected ports as primary options in the Container Port dropdown
- Show visual indicators (badges/icons) for auto-detected vs manual ports
- Add informational tooltip explaining the security benefits of
exposeoverports
Enhanced UI:
Container Port: [Dropdown with detected ports as top options]
┌─ 3000 (from expose) ✓ [Recommended]
├─ 8080 (from expose) ✓ [Recommended]
├─ ─────────────────────
├─ Custom port...
└─ ⚠️ Note: Avoid using 'ports' values (exposes to host network)
Benefits:
- Improved security by default
- Reduced configuration errors
- Better developer experience
- Promotes Docker best practices
Describe alternatives you've considered
- Parse both
exposeandports: Show both but markportswith warnings - adds complexity without clear benefit - Container inspection: Runtime detection of exposed ports - requires container to be running first
Additional context
Technical considerations:
- YAML parsing already exists in Dokploy for docker-compose handling
- Feature should gracefully handle missing
exposedirectives - Consider multi-service compose files (detect per service)
- Maintain backward compatibility with manual port entry
Security impact:
This feature aligns with Docker security best practices by encouraging the use of expose (container-to-container communication) over ports (host exposure), reducing the attack surface of deployed applications.
Similar implementations:
Docker Desktop and Portainer show similar port detection features, validating the usefulness of this approach.
Will you send a PR to implement it?
Maybe, need help
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Container Port configuration entry point and the existing docker-compose YAML parsing used for compose handling. Trace how services and ports are currently represented, then define completion as per-service expose ports appearing as recommended dropdown options while manual entry remains available and missing expose directives are handled gracefully. Add or update coverage for multi-service compose files and the no-expose case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose, typescript
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100