aspire do push does not respect local image name
- 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
`push` CLI command doesn't seem to respect
```csharp
.WithContainerBuildOptions(options =>
{
options.LocalImageName = "Y";
})
```
option and tries to use the resource name to tag the image before pushing.
### Expected Behavior
When CLI tries to tag the image with the registry to push it, it should respect the `LocalImageName`.
### Steps To Reproduce
```csharp
builder.AddProject("X")
.WithContainerBuildOptions(options =>
{
options.LocalImageName = "Y";
})
```
If you try to do `aspire do push` (assuming you also configured registry and such), `build-X` task will build the local image `Y:latest`, but then the `push-X` task will try to tag `X` with `registry/repository:aspire-deploy-` which will fail with error from daemon `No such image: X:latest`.
### Exceptions (if any)
_No response_
### .NET Version info
10.0.200, net472
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.