add multi stage build to netdisco-base
This commit is contained in:
23
docker/netdisco-base/wait_to_start.sh
Executable file
23
docker/netdisco-base/wait_to_start.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo $WAIT_COMMAND
|
||||
echo $WAIT_START_CMD
|
||||
|
||||
is_ready() {
|
||||
eval "$WAIT_COMMAND"
|
||||
}
|
||||
|
||||
# wait until is ready
|
||||
i=0
|
||||
while ! is_ready; do
|
||||
i=`expr $i + 1`
|
||||
if [ $i -ge $WAIT_LOOPS ]; then
|
||||
echo "$(date) - still not ready, giving up"
|
||||
exit 1
|
||||
fi
|
||||
echo "$(date) - waiting to be ready"
|
||||
sleep $WAIT_SLEEP
|
||||
done
|
||||
|
||||
#start the script
|
||||
exec $WAIT_START_CMD
|
||||
Reference in New Issue
Block a user