Skip to content

Update default container image name & tag generation#7472

Merged
DamianEdwards merged 1 commit intomainfrom
damianedwards/fix-7462
Feb 7, 2025
Merged

Update default container image name & tag generation#7472
DamianEdwards merged 1 commit intomainfrom
damianedwards/fix-7462

Conversation

@DamianEdwards
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
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
@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

2 participants