File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 17
17
NAMESPACE = os .environ .get ('NAMESPACE' )
18
18
VERSION = os .environ .get ('VERSION' )
19
19
USE_RANDOM_USER_ID = os .environ .get ('USE_RANDOM_USER_ID' )
20
+ http_proxy = os .environ .get ('http_proxy' , '' )
21
+ https_proxy = os .environ .get ('https_proxy' , '' )
22
+ no_proxy = os .environ .get ('no_proxy' , '' )
20
23
21
24
IMAGE_NAME_MAP = {
22
25
# Hub
@@ -100,6 +103,11 @@ def launch_container(container, **kwargs):
100
103
logger .info ("Running %s container..." % container )
101
104
container_id = client .containers .run ("%s/%s:%s" % (NAMESPACE , IMAGE_NAME_MAP [container ], VERSION ),
102
105
detach = True ,
106
+ environment = {
107
+ 'http_proxy' : http_proxy ,
108
+ 'https_proxy' : https_proxy ,
109
+ 'no_proxy' : no_proxy
110
+ },
103
111
** kwargs ).short_id
104
112
logger .info ("%s up and running" % container )
105
113
return container_id
You can’t perform that action at this time.
0 commit comments