DockerfileFactoryContext.Services Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
var logger = context.Services.GetRequiredService<ILogger>();
</example>
public IServiceProvider Services { get; init; }
member this.Services : IServiceProvider with get, set
Public Property Services As IServiceProvider