Skip to content

In the Docker integration article, use of the PublishAsDockerComposeService() method is incorrect #481

@alistairmatthews

Description

@alistairmatthews

The article suggests that the method is called like this:

var cache = builder.AddRedis("cache")
                   .PublishAsDockerComposeService();

This won't compile or run because you need to pass an action:

var apiService = builder.AddProject<Projects.AspireDockerExp_ApiService>("apiservice")
    .PublishAsDockerComposeService((resource, service) => 
      { 
        service.Name = "redis"; 
      });

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions