Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-amarnath committed Jul 9, 2019
1 parent c8e1c94 commit 03e8b1c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions hack/verify-docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,23 @@ source "$(dirname "$0")/utils.sh"
# check if manager docker image builds
cd_root_path

# DEBUG CODE BEGIN
service docker start
# the service can be started but the docker socket not ready, wait for ready
WAIT_N=0
MAX_WAIT=5
while true; do
# docker ps -q should only work if the daemon is ready
docker ps -q > /dev/null 2>&1 && break
if [[ ${WAIT_N} -lt ${MAX_WAIT} ]]; then
WAIT_N=$((WAIT_N+1))
echo "Waiting for docker to be ready, sleeping for ${WAIT_N} seconds."
sleep ${WAIT_N}
else
echo "Reached maximum attempts, not waiting any longer..."
break
fi
done
# DEBUG CODE END

docker build --file Dockerfile -t capd-manager:pr-verify .

0 comments on commit 03e8b1c

Please sign in to comment.