File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -129,15 +129,21 @@ def docker_runner(params):
129
129
"""Starts a Docker container before tests and gracefully terminates it after."""
130
130
131
131
def is_docker_running ():
132
- """Check if Docker has been run ."""
132
+ """Check if Docker is running and optionally skip pulling the image ."""
133
133
try :
134
134
subprocess .run (
135
135
["docker" , "info" ],
136
136
stdout = subprocess .DEVNULL ,
137
137
stderr = subprocess .DEVNULL ,
138
138
check = True ,
139
139
)
140
- subprocess .run (["docker" , "pull" , LOCALNET_IMAGE_NAME ], check = True )
140
+
141
+ skip_pull = os .getenv ("SKIP_PULL" , "0" ) == "1"
142
+ if not skip_pull :
143
+ subprocess .run (["docker" , "pull" , LOCALNET_IMAGE_NAME ], check = True )
144
+ else :
145
+ print (f"[SKIP_PULL=1] Skipping 'docker pull { LOCALNET_IMAGE_NAME } '" )
146
+
141
147
return True
142
148
except subprocess .CalledProcessError :
143
149
return False
You can’t perform that action at this time.
0 commit comments