mirror of https://github.com/docker/compose.git
Merge pull request #2053 from ndeloof/proxy-config
set proxy env vars based on CLI config
This commit is contained in:
commit
61338d3477
|
@ -269,6 +269,9 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
|
|||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
proxyConfig := types.MappingWithEquals(s.configFile.ParseProxyConfig(s.apiClient.DaemonHost(), nil))
|
||||
env := proxyConfig.OverrideBy(service.Environment)
|
||||
|
||||
containerConfig := container.Config{
|
||||
Hostname: service.Hostname,
|
||||
Domainname: service.DomainName,
|
||||
|
@ -288,7 +291,7 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
|
|||
MacAddress: service.MacAddress,
|
||||
Labels: labels,
|
||||
StopSignal: service.StopSignal,
|
||||
Env: ToMobyEnv(service.Environment),
|
||||
Env: ToMobyEnv(env),
|
||||
Healthcheck: ToMobyHealthCheck(service.HealthCheck),
|
||||
Volumes: volumeMounts,
|
||||
StopTimeout: ToSeconds(service.StopGracePeriod),
|
||||
|
|
Loading…
Reference in New Issue