Skip to content

Expose missing Docker Compose polyglot APIs to TypeScript AppHosts #16363

@sebastienros

Description

@sebastienros

Summary

The current TypeScript/polyglot Docker Compose surface appears narrower than the underlying .NET API, which makes compose publishing scenarios fall back to workarounds.

Likely missing exports

  • DockerComposeEnvironmentExtensions.ConfigureComposeFile(...)
  • DockerComposeServiceExtensions.AsEnvironmentPlaceholder(...) helpers
  • possibly DockerComposeEnvironmentResource.GetHostAddressExpression(...) if that is intended to be polyglot-usable

Inconsistent projection

ConfigureEnvFile(...) looks especially suspicious: the C# API metadata still marks it as ignored / not ATS-compatible, but TypeScript publish tests use compose.configureEnvFile(...) successfully.

Why this matters

TypeScript AppHosts can already use addDockerComposeEnvironment(...) and publishAsDockerComposeService(...), but without the missing compose helpers the publish surface is incomplete for real-world compose customization.

Pointers

  • src/Aspire.Hosting.Docker/DockerComposeEnvironmentExtensions.cs
  • src/Aspire.Hosting.Docker/DockerComposeServiceExtensions.cs
  • src/Aspire.Hosting.Docker/api/Aspire.Hosting.Docker.cs
  • tests/Aspire.Cli.EndToEnd.Tests/TypeScriptPublishTests.cs
  • tests/PolyglotAppHosts/Aspire.Hosting.Docker/TypeScript/apphost.ts

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions