Add proxy support for container actions (#840)

* Add proxy support for container actions in Runner.Worker/StepsRunner

* Move proxy modifications to ContainerActionHandler
This commit is contained in:
klassiker
2020-12-11 19:08:45 +01:00
committed by TingluoHuang
parent 830575dafe
commit 2e7fa13380
2 changed files with 6 additions and 1 deletions

View File

@@ -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;

View File

@@ -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"),