Skip to content

TypeScript AppHost: Add WithImagePushOptions API #15705

@davidfowl

Description

@davidfowl

Summary

The WithImagePushOptions API for customizing container image push behavior is available in C# but not exposed in the TypeScript AppHost.

C# API

builder.AddProject<Projects.Api>("api")
    .WithImagePushOptions(context =>
    {
        var imageName = context.Resource.Name.ToLowerInvariant();
        context.Options.RemoteImageName = $"myorg/{imageName}";
        context.Options.RemoteImageTag = "v1.0.0";
    });

Expected TypeScript equivalent

const api = await builder.addProject("api", "../Api/Api.csproj", "http");
await api.withImagePushOptions(async (context) => {
    context.options.remoteImageName = "myorg/myapi";
    context.options.remoteImageTag = "v1.0.0";
});

Context

This was identified while writing deployment docs at https://github.com/microsoft/aspire.dev. The Docker Compose deployment page currently notes this API as "not yet available" in TypeScript.

Note: WithRemoteImageName and WithRemoteImageTag ARE available in TypeScript, so the simple cases are covered. This issue is about the callback-based customization.

/cc @sebastienros

Metadata

Metadata

Assignees

Labels

area-polyglotIssues related to polyglot apphosts

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions