Category : bash

When I login into a running container, and issue a bash –version command I am seeing the following [email protected]:/myapp# bash –version GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There ..

Read more

i followed the example here and made wait_for script (tested and its working) : #!/bin/bash image_name="$1" counter=1 until docker container ls –filter "name=$image_name" –filter "status=running" | grep healthy1; do >&2 echo "db is unavailable – sleeping" sleep 5 ((counter=counter+1)) echo "$counter" if [[ "$counter" -eq 20 ]] ;then echo "exit" exit 1; fi done now ..

Read more