Skip to content

Conversation

@DamianEdwards
Copy link
Member

Description

Changes the generated container image name and tag used when calling AddDockerfile or WithDockerfile. Name will now just be the resource name lowercased, and the tag will be a hash generated from the app host directory path and current timestamp.

Fixes #7462

Checklist

@DamianEdwards DamianEdwards enabled auto-merge (squash) February 7, 2025 23:42
var fullyQualifiedDockerfilePath = Path.GetFullPath(dockerfilePath, fullyQualifiedContextPath);

var imageName = builder.GenerateImageName();
var imageName = ImageNameGenerator.GenerateImageName(builder);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to avoid overwriting the image name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you mean if someone called WithImage before calling this?

@DamianEdwards DamianEdwards merged commit ffd4c2d into main Feb 7, 2025
65 checks passed
@DamianEdwards DamianEdwards deleted the damianedwards/fix-7462 branch February 7, 2025 23:49
@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 10, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using .AddDockerfile() forces the resource name to be lowercase

3 participants