3 instantiations of Service
Aspire.Hosting.Docker (2)
DockerComposeResourceExtensions.cs (1)
68
var service = new
ComposeService
DockerComposeServiceResource.cs (1)
118
var composeService = new
Service
Aspire.Hosting.Docker.Tests (1)
DockerComposeResourceExtensionsTests.cs (1)
106
var service = new
Service
{ Name = "api" };
35 references to Service
Aspire.Hosting.Docker (32)
DockerComposePublishingContext.cs (2)
101
var
composeService = await serviceResource.BuildComposeServiceAsync(
173
private void HandleComposeFileConfig(ComposeFile composeFile,
Service
composeService, ContainerFileSystemItem? item, int? uid, int? gid, UnixFileMode umask, string path)
DockerComposeResourceExtensions.cs (5)
8
using ComposeService = Aspire.Hosting.Docker.Resources.ComposeNodes.
Service
;
63
Action<
ComposeService
>? configure = null)
68
var
service = new ComposeService
190
internal static
ComposeService
AddVolume(
191
this
ComposeService
service,
DockerComposeServiceCustomizationAnnotation.cs (2)
16
public sealed class DockerComposeServiceCustomizationAnnotation(Action<DockerComposeServiceResource,
Service
> configure) : IResourceAnnotation
22
public Action<DockerComposeServiceResource,
Service
> Configure { get; } = configure ?? throw new ArgumentNullException(nameof(configure));
DockerComposeServiceExtensions.cs (1)
35
public static IResourceBuilder<T> PublishAsDockerComposeService<T>(this IResourceBuilder<T> builder, Action<DockerComposeServiceResource,
Service
> configure)
DockerComposeServiceResource.cs (10)
116
internal async Task<
Service
> BuildComposeServiceAsync(IConfiguration configuration)
118
var
composeService = new Service
151
private void SetContainerName(
Service
composeService)
159
private void SetEntryPoint(
Service
composeService)
172
private void SetPullPolicy(
Service
composeService)
187
private void SetDependsOn(
Service
composeService)
213
private static void SetContainerImage(string? containerImageName,
Service
composeService)
221
private async Task AddEnvironmentVariablesAndCommandLineArgsAsync(
Service
composeService, IConfiguration configuration)
275
private void AddPorts(
Service
composeService)
316
private void AddVolumes(
Service
composeService)
Resources\ComposeFile.cs (4)
43
/// as defined by the <see cref="
Service
"/> class.
52
/// is a <see cref="
Service
"/> object containing the configuration of the service.
55
public Dictionary<string,
Service
> Services { get; set; } = [];
126
public ComposeFile AddService(
Service
service)
Resources\ComposeNodes\Service.cs (8)
477
/// <returns>The updated <see cref="
Service
"/> instance with the added volume.</returns>
478
public
Service
AddVolume(Volume volume)
489
/// <returns>The updated <see cref="
Service
"/> instance with the added volumes.</returns>
490
public
Service
AddVolumes(IEnumerable<Volume> volumes)
502
/// <returns>The updated <see cref="
Service
"/> instance with the added environmental variable.</returns>
503
public
Service
AddEnvironmentalVariable(string key, string? value)
516
/// <returns>The updated <see cref="
Service
"/> instance with the added environmental variable.</returns>
517
public
Service
AddConfig(ConfigReference config)
Aspire.Hosting.Docker.Tests (3)
DockerComposeResourceExtensionsTests.cs (3)
40
var
service = Assert.Single(composeFile.Services).Value;
106
var
service = new Service { Name = "api" };
108
var
result = service.AddVolume("validation-data", "/container/compose-data", type: "bind", isReadOnly: true, volume =>