diff --git a/src/Runner.Worker/Container/ContainerInfo.cs b/src/Runner.Worker/Container/ContainerInfo.cs index bd906c5a2..2173922b1 100644 --- a/src/Runner.Worker/Container/ContainerInfo.cs +++ b/src/Runner.Worker/Container/ContainerInfo.cs @@ -21,6 +21,11 @@ namespace GitHub.Runner.Worker.Container { } + public ContainerInfo(IHostContext hostContext) + { + UpdateWebProxyEnv(hostContext.WebProxy); + } + public ContainerInfo(IHostContext hostContext, Pipelines.JobContainer container, bool isJobContainer = true, string networkAlias = null) { this.ContainerName = container.Alias; diff --git a/src/Runner.Worker/Handlers/ContainerActionHandler.cs b/src/Runner.Worker/Handlers/ContainerActionHandler.cs index b25383459..1b9a87b6d 100644 --- a/src/Runner.Worker/Handlers/ContainerActionHandler.cs +++ b/src/Runner.Worker/Handlers/ContainerActionHandler.cs @@ -70,7 +70,7 @@ namespace GitHub.Runner.Worker.Handlers } // run container - var container = new ContainerInfo() + var container = new ContainerInfo(HostContext) { ContainerImage = Data.Image, ContainerName = ExecutionContext.Id.ToString("N"),