Using .AddDockerfile() forces the resource name to be lowercase #7462
Labels
area-app-model
Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
breaking-change
Issue or PR that represents a breaking API or functional change over a prerelease.
Milestone
Is there an existing issue for this?
Describe the bug
All of the resources in my Aspire project have names that are using PascalCase. I tried adding a new resource that is built from a Dockerfile, but I'm getting the error
invalid tag "MyResourceName-image-b3a94344fc439fed1ba4f80c352c4fb0417a6162:latest": repository name must be lowercase
.This happens because the
WithDockerfile()
extension is using the name of the resource to generate the name of the docker image, but it does not provide a way to separate the naming of the image from the name of the resource.Expected Behavior
The
AddDockerfile()
andWithDockerfile()
extensions should provide an overload that allows users to influence the naming of the image so that it does not have to be tied to the naming of the Resource.Steps To Reproduce
Exceptions (if any)
invalid tag "MyResourceName-image-b3a94344fc439fed1ba4f80c352c4fb0417a6162:latest": repository name must be lowercase
.NET Version info
Anything else?
.NET Aspire Version: 9.0.0
The text was updated successfully, but these errors were encountered: