Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

Service

Classsealednet10.0
📦 Aspire.Hosting.Docker v13.6.0
Represents a Docker Compose service definition.
namespace Aspire.Hosting.Docker.Resources.ComposeNodes;
public sealed class Service
: Aspire.Hosting.Docker.Resources.ComposeNodes.NamedComposeMember
{
// ...
}
This class provides YAML mapping for various properties associated with a service in Docker Compose, such as image, container configuration, environment variables, networks, and more. It is designed to map directly to the service properties defined in a Docker Compose YAML file.
View all constructors
View all properties
View all methods
The Service class can be used to define a container's image, ports, volumes, environment settings, and advanced settings like logging and health checks.