@@ -206,23 +206,23 @@ private async Task<ResolvedContainerBuildOptions> ResolveContainerBuildOptionsAs
206206
207207 public async Task BuildImagesAsync ( IEnumerable < IResource > resources , CancellationToken cancellationToken = default )
208208 {
209- var ContainerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
209+ var containerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
210210 logger . LogInformation ( "Starting to build container images" ) ;
211211
212212 // Only check container runtime health if there are resources that need it
213213 if ( await ResourcesRequireContainerRuntimeAsync ( resources , cancellationToken ) . ConfigureAwait ( false ) )
214214 {
215- logger . LogDebug ( "Checking {ContainerRuntimeName} health" , ContainerRuntime . Name ) ;
215+ logger . LogDebug ( "Checking {ContainerRuntimeName} health" , containerRuntime . Name ) ;
216216
217- var containerRuntimeHealthy = await ContainerRuntime . CheckIfRunningAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
217+ var containerRuntimeHealthy = await containerRuntime . CheckIfRunningAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
218218
219219 if ( ! containerRuntimeHealthy )
220220 {
221- logger . LogError ( "Container runtime '{ContainerRuntimeName}' is not running or is unhealthy. Cannot build container images." , ContainerRuntime . Name ) ;
222- throw new InvalidOperationException ( $ "Container runtime '{ ContainerRuntime . Name } ' is not running or is unhealthy.") ;
221+ logger . LogError ( "Container runtime '{ContainerRuntimeName}' is not running or is unhealthy. Cannot build container images." , containerRuntime . Name ) ;
222+ throw new InvalidOperationException ( $ "Container runtime '{ containerRuntime . Name } ' is not running or is unhealthy.") ;
223223 }
224224
225- logger . LogDebug ( "{ContainerRuntimeName} is healthy" , ContainerRuntime . Name ) ;
225+ logger . LogDebug ( "{ContainerRuntimeName} is healthy" , containerRuntime . Name ) ;
226226 }
227227
228228 foreach ( var resource in resources )
@@ -236,25 +236,25 @@ public async Task BuildImagesAsync(IEnumerable<IResource> resources, Cancellatio
236236
237237 public async Task BuildImageAsync ( IResource resource , CancellationToken cancellationToken = default )
238238 {
239- var ContainerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
239+ var containerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
240240 logger . LogInformation ( "Building container image for resource {ResourceName}" , resource . Name ) ;
241241
242242 var options = await ResolveContainerBuildOptionsAsync ( resource , cancellationToken ) . ConfigureAwait ( false ) ;
243243
244244 // Check if this resource needs a container runtime
245245 if ( await ResourcesRequireContainerRuntimeAsync ( [ resource ] , cancellationToken ) . ConfigureAwait ( false ) )
246246 {
247- logger . LogDebug ( "Checking {ContainerRuntimeName} health" , ContainerRuntime . Name ) ;
247+ logger . LogDebug ( "Checking {ContainerRuntimeName} health" , containerRuntime . Name ) ;
248248
249- var containerRuntimeHealthy = await ContainerRuntime . CheckIfRunningAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
249+ var containerRuntimeHealthy = await containerRuntime . CheckIfRunningAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
250250
251251 if ( ! containerRuntimeHealthy )
252252 {
253- logger . LogError ( "Container runtime '{ContainerRuntimeName}' is not running or is unhealthy. Cannot build container image." , ContainerRuntime . Name ) ;
254- throw new InvalidOperationException ( $ "Container runtime '{ ContainerRuntime . Name } ' is not running or is unhealthy.") ;
253+ logger . LogError ( "Container runtime '{ContainerRuntimeName}' is not running or is unhealthy. Cannot build container image." , containerRuntime . Name ) ;
254+ throw new InvalidOperationException ( $ "Container runtime '{ containerRuntime . Name } ' is not running or is unhealthy.") ;
255255 }
256256
257- logger . LogDebug ( "{ContainerRuntimeName} is healthy" , ContainerRuntime . Name ) ;
257+ logger . LogDebug ( "{ContainerRuntimeName} is healthy" , containerRuntime . Name ) ;
258258 }
259259
260260 if ( resource is ProjectResource )
@@ -421,7 +421,7 @@ private async Task<bool> ExecuteDotnetPublishAsync(IResource resource, ResolvedC
421421
422422 private async Task BuildContainerImageFromDockerfileAsync ( IResource resource , DockerfileBuildAnnotation dockerfileBuildAnnotation , string imageName , ResolvedContainerBuildOptions options , CancellationToken cancellationToken )
423423 {
424- var ContainerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
424+ var containerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
425425 logger . LogInformation ( "Building image: {ResourceName}" , resource . Name ) ;
426426
427427 // If there's a factory, generate the Dockerfile content and write it to the specified path
@@ -475,7 +475,7 @@ private async Task BuildContainerImageFromDockerfileAsync(IResource resource, Do
475475
476476 try
477477 {
478- await ContainerRuntime . BuildImageAsync (
478+ await containerRuntime . BuildImageAsync (
479479 dockerfileBuildAnnotation . ContextPath ,
480480 dockerfileBuildAnnotation . DockerfilePath ,
481481 containerBuildOptions ,
@@ -518,8 +518,8 @@ await ContainerRuntime.BuildImageAsync(
518518
519519 public async Task PushImageAsync ( IResource resource , CancellationToken cancellationToken )
520520 {
521- var ContainerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
522- await ContainerRuntime . PushImageAsync ( resource , cancellationToken ) . ConfigureAwait ( false ) ;
521+ var containerRuntime = await GetContainerRuntimeAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
522+ await containerRuntime . PushImageAsync ( resource , cancellationToken ) . ConfigureAwait ( false ) ;
523523 }
524524
525525 // .NET Container builds that push OCI images to a local file path do not need a runtime
0 commit comments