Skip to content

Add dedicated documentation for DCP container networking tunnel#530

Merged
IEvangelist merged 7 commits intomainfrom
copilot/fix-issue-325
May 7, 2026
Merged

Add dedicated documentation for DCP container networking tunnel#530
IEvangelist merged 7 commits intomainfrom
copilot/fix-issue-325

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

Adds a new Fundamentals documentation page explaining Aspire's DCP container tunnel for container-to-host connectivity, and links it from existing networking documentation so readers can discover the feature.

Changes Made

  • New page: Added fundamentals/container-networking.mdx documenting the container tunnel, network identifiers, and how to disable the tunnel if needed.
  • Sidebar: Added a "Container networking" entry with translated labels in docs.topics.ts.
  • Cross-reference: Added a pointer from networking-overview.mdx to the new container networking page.
  • Tunnel steps: Wrapped in <Steps> component; step 2 clarifies that the tunnel container exposes a separate port for each unique host port (with different port values than the originals); step 3 describes endpoint resolution via reference expressions, which may surface as environment variables, startup parameters, or other configuration mechanisms.
  • Shell commands: Used OsAwareTabs with bash and PowerShell tabs for environment variable instructions.
  • Intro paragraph: Broadened language to mention C#, Python, and TypeScript (not just .NET); defined DCP on first use with a link to the architecture overview.
  • Enabled by default: Updated to reflect that the container tunnel is enabled by default starting in Aspire 13.3. The "Enable" section was replaced with a "Disable" section showing how to set ASPIRE_ENABLE_CONTAINER_TUNNEL=false if the tunnel causes issues.
  • Merge conflicts: Merged main to resolve conflicts in the sidebar config and networking overview.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ixes #325)

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue 325 using doc writer skill Add dedicated documentation for DCP container networking tunnel Mar 9, 2026
Copy link
Copy Markdown
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good so far, but let's double check it for accuracy by using the .github/skills/doc-tester/SKILL.md skill. Please also consider all new comments and feedback/suggestions. @copilot

Comment thread src/frontend/src/content/docs/fundamentals/container-networking.mdx
Comment thread src/frontend/src/content/docs/fundamentals/container-networking.mdx
@IEvangelist
Copy link
Copy Markdown
Member

please also link to architecture content that contains details for DCP

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 12, 2026

This PR looks good so far, but let's double check it for accuracy by using the .github/skills/doc-tester/SKILL.md skill. Please also consider all new comments and feedback/suggestions. @copilot

Addressed both review comments in 0bb13c3:

  • Wrapped the tunnel steps in a <Steps> component
  • Replaced the bash-only block with OsAwareTabs showing both bash and PowerShell

Ran doc-tester validation: all 5 internal links return HTTP 200, Steps component renders numbered steps correctly, and both OS tabs (bash/PowerShell) display and switch as expected.

Copy link
Copy Markdown
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot please see my comment

import { Aside, Steps } from '@astrojs/starlight/components';
import OsAwareTabs from '@components/OsAwareTabs.astro';

During local development, your Aspire app model often includes a mix of container resources and host-based services (such as .NET projects or executables). Container-to-container communication works naturally over the bridge network, but containers that need to reach services running on the host require a different approach. Aspire solves this with the **container tunnel**, a DCP capability that provides reliable, transparent container-to-host connectivity.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of .NET projects or executables we should say something about C#, TypeScript, Python, as we support much more than just .NET.

Also, DCP is mentioned before it's defined in the following paragraph. We need to fix that and please also link to architecture content that contains details for DCP

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 3f8702e — broadened to "C#, Python, or TypeScript projects", moved the full "Developer Control Plane (DCP)" definition to the intro paragraph with a link to the architecture overview, and updated the next paragraph to use just "DCP" since it's already defined.

Updated intro

@IEvangelist IEvangelist marked this pull request as ready for review March 13, 2026 12:17
Copilot AI review requested due to automatic review settings March 13, 2026 12:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated Fundamentals doc page explaining Aspire’s DCP container tunnel (container-to-host connectivity), and links it from existing networking documentation so readers can discover the feature and how to enable it.

Changes:

  • Added new fundamentals/container-networking.mdx page documenting the container tunnel, network identifiers, and enablement via ASPIRE_ENABLE_CONTAINER_TUNNEL.
  • Added a cross-reference from fundamentals/networking-overview.mdx to the new page.
  • Added a sidebar entry for “Container networking”.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/frontend/src/content/docs/fundamentals/networking-overview.mdx Adds a pointer to the new container networking/tunnel documentation.
src/frontend/src/content/docs/fundamentals/container-networking.mdx New dedicated doc page describing the DCP container tunnel, network identifiers, and opt-in instructions.
src/frontend/config/sidebar/docs.topics.ts Adds the new Fundamentals sidebar entry (with translated labels).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

[service discovery](/fundamentals/service-discovery/).
</Aside>

When containers need to reach host-based services, Aspire can use the **container tunnel** to provide reliable connectivity. For more information, see [Container networking](/fundamentals/container-networking/).
import { Aside, Steps } from '@astrojs/starlight/components';
import OsAwareTabs from '@components/OsAwareTabs.astro';

During local development, your Aspire app model often includes a mix of container resources and host-based services (such as .NET projects or executables). Container-to-container communication works naturally over the bridge network, but containers that need to reach services running on the host require a different approach. Aspire solves this with the **container tunnel**, a DCP capability that provides reliable, transparent container-to-host connectivity.
Comment thread src/frontend/src/content/docs/fundamentals/container-networking.mdx
…e with architecture link

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 13, 2026

please also link to architecture content that contains details for DCP

Added in 3f8702e — the intro paragraph now links DCP to /architecture/overview/#developer-control-plane on first mention, and the See Also section already had that link as well.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@IEvangelist
Copy link
Copy Markdown
Member

Hey @copilot, please rebase this PR as there are merge conflicts. Also, please consider the following feedback as well:

The biggest issue is that in Aspire 13.3 container tunnel is ENABLED by default.
You do not need to do anything to enable it. But if it causes trouble, you can disable it by using the same environment variable.

Other than that I would change steps 2 and 3 in the description of how the tunnel works to the following

<Steps>
 
1. **Dependency detection**: When the AppHost builds the app model, it identifies which containers reference endpoints on host-based resources.
 
2. **Tunnel setup**: DCP creates a network path (proxy endpoint) from the container bridge network to the host, so containers can reach host-bound endpoints. This happens for every host-bound endpoint referenced by one or more containers.
 
3. **Endpoint injection**: When a container resolves an endpoint that is implemented by a host-based resource, the endpoint resolves to corresponding proxy endpoint provided by the tunnel. Proxy endpoint information is then injected into container via environment variables or startup parameters, in the same way as it happens for other endpoints.
 
4. **Automatic cleanup**: When the AppHost process stops, DCP tears down the tunnel along with the rest of the orchestrated resources.
 
</Steps>

# Conflicts:
#	src/frontend/config/sidebar/docs.topics.ts
#	src/frontend/src/content/docs/fundamentals/networking-overview.mdx

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

Hey @copilot, please rebase this PR as there are merge conflicts. Also, please consider the following feedback as well:

The biggest issue is that in Aspire 13.3 container tunnel is ENABLED by defau...

Merged main to resolve conflicts in 0f7faf91. Also updated the page to reflect the tunnel being enabled by default in Aspire 13.3:

  • Changed "Enable the container tunnel" section → "Disable the container tunnel" with ASPIRE_ENABLE_CONTAINER_TUNNEL=false instructions
  • Removed "Once enabled" and experimental/caution language
  • Updated steps 2 and 3 to describe the tunnel container deployment and endpoint injection via the tunnel

Note: your suggested MDX content for steps 2 and 3 appeared empty in the comment — I rewrote them to describe the tunnel container and endpoint injection. Please let me know if you'd like different wording.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • iojs.org
    • Triggering command: /usr/bin/curl curl -q --fail --compressed -L -s REDACTED -o - (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Copy Markdown

@karolz-ms karolz-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall, thank you, but please consider my comment regarding "how it works" section--I think as-is that part is a bit confusing.


2. **Tunnel container**: DCP deploys a lightweight tunnel container on the Aspire container bridge network. This container serves as the entry point for all container-to-host traffic.

3. **Endpoint injection**: DCP injects the tunnel container's address into each dependent container as environment variables, so that containers seamlessly route traffic to the host through the tunnel.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The container (and its address) are the same and indeed serves as a single point of entry, but the port is different (one container network port for each unique host port). Also, they are not the same value (it is NOT the case that host port 1234 will be projected as port 1234 on container network).

Also, the addresses and ports may be injected as container variables, but may also be provided as startup parameters, or in general, retrieved via reference expressions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot, please address this feedback

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 58b5175:

  • Step 2 now clarifies that the tunnel container exposes a separate port for each unique host port, and that the container network port values differ from the original host port values.
  • Step 3 renamed to "Endpoint resolution" — now mentions reference expressions as the general mechanism, with environment variables, startup parameters, or other configuration as possible delivery methods.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

Looks great overall, thank you, but please consider my comment regarding "how it works" section--I think as-is that part is a bit confusing.

Addressed in 58b5175 — updated steps 2 and 3 per @karolz-ms's feedback to clarify the per-port mapping and reference expression mechanisms.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./node_modules/.bin/../astro/bin/astro.mjs sync (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/aspire.dev/aspire.dev/src/frontend/node_modules/.bin/../astro/bin/astro.mjs dev --host 0.0.0.0 --port 4321 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@IEvangelist IEvangelist merged commit 727d82b into main May 7, 2026
5 checks passed
@IEvangelist IEvangelist deleted the copilot/fix-issue-325 branch May 7, 2026 16:46
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.

4 participants