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
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proxyConfig := types.MappingWithEquals(s.configFile.ParseProxyConfig(s.apiClient.DaemonHost(), nil))
|
||||||
|
env := proxyConfig.OverrideBy(service.Environment)
|
||||||
|
|
||||||
containerConfig := container.Config{
|
containerConfig := container.Config{
|
||||||
Hostname: service.Hostname,
|
Hostname: service.Hostname,
|
||||||
Domainname: service.DomainName,
|
Domainname: service.DomainName,
|
||||||
|
@ -288,7 +291,7 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
|
||||||
MacAddress: service.MacAddress,
|
MacAddress: service.MacAddress,
|
||||||
Labels: labels,
|
Labels: labels,
|
||||||
StopSignal: service.StopSignal,
|
StopSignal: service.StopSignal,
|
||||||
Env: ToMobyEnv(service.Environment),
|
Env: ToMobyEnv(env),
|
||||||
Healthcheck: ToMobyHealthCheck(service.HealthCheck),
|
Healthcheck: ToMobyHealthCheck(service.HealthCheck),
|
||||||
Volumes: volumeMounts,
|
Volumes: volumeMounts,
|
||||||
StopTimeout: ToSeconds(service.StopGracePeriod),
|
StopTimeout: ToSeconds(service.StopGracePeriod),
|
||||||
|
|
Loading…
Reference in New Issue