microsoft / microsoft/aspire

Docker Compose Image Tag for Projects

Open
#11,542 4 comments 0 reactions 1 assignee Claimed by @captainsafia View on GitHub
area-app-model
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

### Is your feature request related to a problem? Please describe the problem.

given the simple AppHost Example here i cant control the Tag that gets created by "aspire publish". A Tag Per Project does not seem nessecary, but for the build a Version would help identification.

```
var builder = DistributedApplication.CreateBuilder(args);

var compose = builder.AddDockerComposeEnvironment("compose")
.WithProperties(env =>
{
env.DefaultNetworkName = "adv-network";
});

var api = builder.AddProject("adv-api")
.WithReference(postgres)
.WaitForCompletion(migrator);
```

### Describe the solution you'd like

Id like a Solution like:

```
var compose = builder.AddDockerComposeEnvironment("compose")
.WithProperties(env =>
{
env.DefaultNetworkName = "adv-network";
env.ProjectImageTag = "not-latest";
});
```

### Additional context

My current CI solution has a workaround, but requires the following steps per service:

- download latest image
- check timestamp if it may be the correct (not robust)
- tag the image
- upload the new tagged image

this is a not robust and not satisfying way of archieving this behavior.

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.