-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build]: wait up to 60 seconds for docker engine to start (#3067)
* [build]: wait 60 seconds for docker engine to start On some platforms, it can take more than 1 second for docker engine to start. Signed-off-by: Guohan Lu <gulv@microsoft.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
total_time=$1 | ||
cnt=0 | ||
while [ $cnt -le $total_time ]; do | ||
docker info 1>/dev/null | ||
rv=$? | ||
if [ $rv -eq 0 ]; then | ||
exit 0 | ||
fi | ||
sleep 1 | ||
cnt=$((cnt+1)) | ||
done | ||
|
||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters