Share via


DockerfileFactoryContext.Services Property

Definition

Gets the IServiceProvider for resolving dependencies required by Dockerfile factory functions.

The service provider typically contains services such as IHostEnvironment, ILogger, and configuration objects relevant to the application model. Factory functions can use this provider to obtain required services for generating Dockerfiles.

<example>
var logger = context.Services.GetRequiredService<ILogger>();
</example>
public IServiceProvider Services { get; init; }
member this.Services : IServiceProvider with get, set
Public Property Services As IServiceProvider

Property Value

Applies to