Check if a context name exists (replace $CONTEXT_NAME)
[ -n "$(docker context ls --format '{{ index .Name }}' | grep -w $CONTEXT_NAME)" ]
Check if a context name exists (replace $CONTEXT_NAME)
[ -n "$(docker context ls --format '{{ index .Name }}' | grep -w $CONTEXT_NAME)" ]