File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,29 @@ if (NBL_WITH_DOCKER)
216
216
message (FATAL_ERROR "Docker installer exited with non-zero return code" )
217
217
endif ()
218
218
endif ()
219
+
220
+ macro (wait5sec )
221
+ execute_process (COMMAND powershell -Command "Start-Sleep -Seconds 5" )
222
+ endmacro ()
223
+
224
+ # DDT stands for Docker Daemon Test
225
+ set (DDT_MAX_ATTEMPTS 10 )
226
+ set (DDT_DOCKER_RESPONDING False )
227
+ foreach (ATTEMPT RANGE 1 ${DDT_MAX_ATTEMPTS} )
228
+ message (STATUS "Attempt ${ATTEMPT} of ${DDT_MAX_ATTEMPTS} : Checking Docker Endpoint" )
229
+ execute_process (COMMAND ${DOCKER_EXECUTABLE} info RESULT_VARIABLE DOCKER_EXIT_CODE OUTPUT_QUIET )
230
+
231
+ if (DOCKER_EXIT_CODE EQUAL 0 )
232
+ set (DDT_DOCKER_RESPONDING True )
233
+ break ()
234
+ endif ()
235
+
236
+ wait5sec ()
237
+ endforeach ()
238
+
239
+ if (NOT DDT_DOCKER_RESPONDING )
240
+ message (FATAL_ERROR "Docker Daemon is not responding. Please make sure it's running in the background" )
241
+ endif ()
219
242
endif ()
220
243
221
244
set (THIRD_PARTY_SOURCE_DIR "${PROJECT_SOURCE_DIR} /3rdparty" )
You can’t perform that action at this time.
0 commit comments