Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 61338d3

Browse files
author
Ulysses Souza
authored
Merge pull request #2053 from ndeloof/proxy-config
set proxy env vars based on CLI config
2 parents 2a6791e + 007ec5a commit 61338d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/compose/create.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
269269
return nil, nil, nil, err
270270
}
271271

272+
proxyConfig := types.MappingWithEquals(s.configFile.ParseProxyConfig(s.apiClient.DaemonHost(), nil))
273+
env := proxyConfig.OverrideBy(service.Environment)
274+
272275
containerConfig := container.Config{
273276
Hostname: service.Hostname,
274277
Domainname: service.DomainName,
@@ -288,7 +291,7 @@ func (s *composeService) getCreateOptions(ctx context.Context, p *types.Project,
288291
MacAddress: service.MacAddress,
289292
Labels: labels,
290293
StopSignal: service.StopSignal,
291-
Env: ToMobyEnv(service.Environment),
294+
Env: ToMobyEnv(env),
292295
Healthcheck: ToMobyHealthCheck(service.HealthCheck),
293296
Volumes: volumeMounts,
294297
StopTimeout: ToSeconds(service.StopGracePeriod),

0 commit comments

Comments
 (0)