diff --git a/src/frontend/src/content/docs/app-host/configuration.mdx b/src/frontend/src/content/docs/app-host/configuration.mdx index c395a3e6f7..8cff7ea5bf 100644 --- a/src/frontend/src/content/docs/app-host/configuration.mdx +++ b/src/frontend/src/content/docs/app-host/configuration.mdx @@ -224,3 +224,29 @@ You might override `DcpCliPath` in these scenarios: + +### ContainerTunnelBaseImage + +The `ContainerTunnelBaseImage` property overrides the base image DCP uses to +build the [container tunnel](/fundamentals/container-networking/) client +proxy image, which enables container-to-host connectivity. + +#### Override options + +| Method | Example | +| ------ | ------- | +| Aspire CLI configuration | `aspire config set containerTunnel.baseImage example.com/aspire-tunnel:configured` | +| Command-line argument | `--dcp-container-tunnel-base-image example.com/aspire-tunnel:configured` | +| Configuration | `DcpPublisher:ContainerTunnelBaseImage` | +| Environment variable | `ASPIRE_CONTAINER_TUNNEL_BASE_IMAGE` | + +Explicit AppHost configuration (the command-line argument or +`DcpPublisher:ContainerTunnelBaseImage`) and an existing +`ASPIRE_CONTAINER_TUNNEL_BASE_IMAGE` environment value take precedence over +the Aspire CLI configuration value. + +#### When to use + +You might override `ContainerTunnelBaseImage` when your environment requires +a customized or mirrored base image for the container tunnel, such as when +the default image isn't reachable from an isolated or air-gapped network. diff --git a/src/frontend/src/content/docs/fundamentals/container-networking.mdx b/src/frontend/src/content/docs/fundamentals/container-networking.mdx index 7c6255b898..26186b7600 100644 --- a/src/frontend/src/content/docs/fundamentals/container-networking.mdx +++ b/src/frontend/src/content/docs/fundamentals/container-networking.mdx @@ -176,6 +176,22 @@ aspire run When the tunnel is disabled, containers fall back to platform-specific mechanisms (such as `host.docker.internal`) to reach host-based services. +## Configure the container tunnel base image + +DCP supports overriding the base image used to build the container tunnel +client proxy image. This is useful for environments that require a +customized or mirrored base image: + +```bash title="Set the container tunnel base image" +aspire config set containerTunnel.baseImage example.com/aspire-tunnel:configured +``` + +For other ways to configure this value, including the +`--dcp-container-tunnel-base-image` command-line argument and the +`ASPIRE_CONTAINER_TUNNEL_BASE_IMAGE` environment variable, see +[`ContainerTunnelBaseImage`](/app-host/configuration/#containertunnelbaseimage) +in the AppHost configuration reference. + ## When to use the container tunnel The container tunnel is useful whenever containers need to communicate with host-based services. Common scenarios include: diff --git a/src/frontend/src/content/docs/reference/cli/configuration.mdx b/src/frontend/src/content/docs/reference/cli/configuration.mdx index 2c410077d3..c51668f09f 100644 --- a/src/frontend/src/content/docs/reference/cli/configuration.mdx +++ b/src/frontend/src/content/docs/reference/cli/configuration.mdx @@ -150,6 +150,29 @@ platform path separator. If `certificates.nssDbPaths` is unset, `aspire certs trust` will also honor the `DOTNET_DEV_CERTS_NSSDB_PATHS` environment variable, but Aspire configuration will take precedence when present. When no specific configuration is supplied, Aspire applies certificate trust to NSS databases in well-known browser specific paths for Firefox and Chrome/Chromium. Run [`aspire certs trust`](../commands/aspire-certs-trust/) to apply the configured trust settings. +### Configure the container tunnel base image + +Use `containerTunnel.baseImage` to override the base image used by the +[container network tunnel](/fundamentals/container-networking/) that routes +traffic from containers to host-based services. This is useful in +environments that require a customized or mirrored base image: + +```bash title="Set the container tunnel base image" +aspire config set containerTunnel.baseImage example.com/aspire-tunnel:configured +``` + +The CLI projects this value to the AppHost process as the +`ASPIRE_CONTAINER_TUNNEL_BASE_IMAGE` environment variable. .NET AppHosts +receive it in their existing process environment, while polyglot AppHosts +receive it through the existing AppHost server-session environment so the +value reaches Aspire Hosting and DCP rather than the guest client process. + +The AppHost also supports setting this value directly through the +`DcpPublisher:ContainerTunnelBaseImage` configuration key or the +`--dcp-container-tunnel-base-image` command-line argument. Explicit AppHost +configuration and any existing `ASPIRE_CONTAINER_TUNNEL_BASE_IMAGE` +environment value take precedence over the Aspire CLI configuration value. + :::tip Some feature flags shown by `aspire config list --all` may correspond to preview, migration, or hidden functionality. Treat the output of your diff --git a/src/frontend/src/content/docs/reference/cli/includes/config-settings-table.md b/src/frontend/src/content/docs/reference/cli/includes/config-settings-table.md index 6a3a71c6b6..0b582eba17 100644 --- a/src/frontend/src/content/docs/reference/cli/includes/config-settings-table.md +++ b/src/frontend/src/content/docs/reference/cli/includes/config-settings-table.md @@ -7,6 +7,7 @@ title: Config Settings Table | `appHost.path` | `appHost.path` | Project-scoped path to the default AppHost entry point. This setting must be configured in the local `aspire.config.json` file. | | `certificates.nssDbPaths` | `certificates.nssDbPaths` | NSS database paths used for browser certificate trust on Linux. Separate paths with the platform path separator. Prefix a path with `firefox=` or `chromium=` to apply the trust settings expected by that browser family. Takes precedence over the upstream `DOTNET_DEV_CERTS_NSSDB_PATHS` environment variable. | | `channel` | `channel` | Default Aspire channel used by channel-aware commands such as `aspire new`, `aspire init`, and `aspire update`. | +| `containerTunnel.baseImage` | `containerTunnel.baseImage` | Base image used by the [container network tunnel](/fundamentals/container-networking/) that routes traffic to host services. Projected to the AppHost as `ASPIRE_CONTAINER_TUNNEL_BASE_IMAGE`. | | `features.defaultWatchEnabled` | `features.defaultWatchEnabled` | Enable or disable watch mode by default when running Aspire applications for automatic restarts on file changes. | | `features.experimentalPolyglot:go` | `features.experimentalPolyglot:go` | Enable or disable experimental Go AppHost support. | | `features.experimentalPolyglot:java` | `features.experimentalPolyglot:java` | Enable or disable experimental Java AppHost support. |