microsoft / microsoft/aspire

Publishing Docker image for project resource to GitHub fails due to ContainerRepository

Open
#8,748 5 comments 1 reaction 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

### Describe the bug

I'm excited to try the new docker-compose publisher, knowing that it is still a preview. This is exactly what I am looking for to use in our current project!

I am trying to publish using the aspire.cli withe the docker-compose publisher. This works fine locally (not specifying the `ContainerRegistry` property in the project file) but fails as soon as I want to publish to GitHub.
Usually I set the property `ContainerRepository` in my project file to something like "company/packages/product".
However, aspire overwrites this property with the resource name which is "product" in my case.

Running aspire with the --debug switch shows that dotnet publish is being called with `/p:ContainerRepository=product`

`ResourceContainerImageBuilder.BuildProjectContainerImageAsync()` always adds that property to the dotnet call. Would it make sense to allow overriding this behavior?

### Expected Behavior

I would expect Aspire to use the Property `ContainerRepository` as defined in the project file. This is how `dotnet publish` generates the image name.

### Steps To Reproduce

_No response_

### Exceptions (if any)

There is no exception being displayed. The publishing step seems to run forever in this case.

### .NET Version info

.Net SDK 9.0.203

### Anything else?

Aspire 9.2
aspire.cli 9.2.0-preview.1.25209.2

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.