I'm looking to improve it in brevity, readability, and simplicity. Basically, I'm just looking for a more elegant solution. What improvements can I make?
i=0
while true; do
OUTPUT="$(docker inspect --format='{{json .State.Health.Status}}' su-apache)"
if [ $OUTPUT = '"healthy"' ]; then
echo
break
fi
echo -en "\r\033[KWaiting $i seconds for su-apache to finish starting... Current health: $OUTPUT"
let "i++"
sleep 1
done
echo 'Environment started successfully.'