File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -223,8 +223,8 @@ if (NBL_WITH_DOCKER)
223
223
endmacro ()
224
224
225
225
# helper macro for calling docker, takes args as a string
226
- macro (calldocker args )
227
- execute_process (COMMAND ${DOCKER_EXECUTABLE} ${args } RESULT_VARIABLE DOCKER_EXIT_CODE OUTPUT_QUIET )
226
+ macro (calldocker )
227
+ execute_process (COMMAND ${DOCKER_EXECUTABLE} ${ARGN } RESULT_VARIABLE DOCKER_EXIT_CODE OUTPUT_QUIET )
228
228
endmacro ()
229
229
230
230
# check if the docker daemon is running
@@ -233,7 +233,7 @@ if (NBL_WITH_DOCKER)
233
233
set (DDT_DOCKER_RESPONDING False )
234
234
foreach (ATTEMPT RANGE 1 ${DDT_MAX_ATTEMPTS} )
235
235
message (STATUS "Attempt ${ATTEMPT} of ${DDT_MAX_ATTEMPTS} : Checking Docker Endpoint" )
236
- calldocker (" info" )
236
+ calldocker (info )
237
237
238
238
if (DOCKER_EXIT_CODE EQUAL 0 )
239
239
set (DDT_DOCKER_RESPONDING True )
@@ -247,6 +247,13 @@ if (NBL_WITH_DOCKER)
247
247
message (FATAL_ERROR "Docker Daemon is not responding. Please make sure it's running in the background" )
248
248
endif ()
249
249
250
+ set (DNT_NETWORK_NAME "docker_default" )
251
+ message (STATUS "Checking wether \" ${DNT_NETWORK_NAME} \" docker network exist." )
252
+ calldocker (network inspect ${DNT_NETWORK_NAME} )
253
+ if (NOT DOCKER_EXIT_CODE EQUAL 0 )
254
+ message (STATUS "Docker network \" ${DNT_NETWORK_NAME} \" doesn't exist. Creating one.'" )
255
+ calldocker (network create -d nat ${DNT_NETWORK_NAME} )
256
+ endif ()
250
257
endif ()
251
258
252
259
set (THIRD_PARTY_SOURCE_DIR "${PROJECT_SOURCE_DIR} /3rdparty" )
You can’t perform that action at this time.
0 commit comments