microsoft / microsoft/aspire

Add ability to configure container image when publishing by docker compose publisher

Open
#8,842 6 comments 3 reactions 0 assignees View on GitHub
area-deployment docker-compose
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

Currently, there is no way to configure `registry`, `tags`, `labels`, and other options that the SDK provides for building a container image; only `ContainerRepository` is used to build the image.

https://github.com/dotnet/aspire/blob/b1165fd1aa0fab879299074aa8636791cf52f8e3/src/Aspire.Hosting/Publishing/ResourceContainerImageBuilder.cs#L89-L101

### Describe the solution you'd like

Add an ability to configure the container image using the properties that the SDK provides, such as `ContainerBaseImage` , `ContainerRegistry` , `ContainerImageTag(s)`, and other options mentioned in the docs https://learn.microsoft.com/en-us/dotnet/core/containers/publish-configuration.

Consider adding an annotation to the Project resource and leveraging it in `IResourceContainerImageBuilder.BuildImageAsync`.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.