Skip to content

Compose: Add guidance for using host network in Swarm mode and Docker Stack #22724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

deahtstroke
Copy link

Description

This PR adds a new how-to section explaining how to use the host network when deploying services in Swarm mode via docker stack deploy.

Key additions:

  • YAML example showing how to reference the built-in host network as an external network.
  • A note outlining key limitations when using host networking with Swarm, such as:
    • Only supported in global service mode
    • No support for Swarm ingress networking or service discovery
    • Port-binding limitations

This is meant to clarify a niche but important case for users deploying Compose files to Swarm clusters that need access to the host's network. Let me know if there are other cross-references I should do in other parts of the docs.

Related issues or tickets

Issue 22684

Reviews

  • Technical review
  • Editorial review
  • Product review

Copy link

netlify bot commented May 30, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 0d85e2a
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/68392c034f64eb0008846aab
😎 Deploy Preview https://deploy-preview-22724--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the area/compose Relates to docker-compose.yml spec or docker-compose binary label May 30, 2025
@aevesdocker aevesdocker self-requested a review May 30, 2025 07:27
@aevesdocker
Copy link
Contributor

Thanks for the PR @deahtstroke. Will take a look shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/compose Relates to docker-compose.yml spec or docker-compose binary
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants