Skip to content

Instantly share code, notes, and snippets.

@eripa
Created March 25, 2016 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eripa/a37a792935fa286b0e41 to your computer and use it in GitHub Desktop.
Save eripa/a37a792935fa286b0e41 to your computer and use it in GitHub Desktop.
docker wait for other service
echo "Stalling for MySQL.. (${MYSQL_PORT_3306_TCP_ADDR}:${MYSQL_PORT_3306_TCP_PORT})"
while true; do
nc -q 1 "$MYSQL_PORT_3306_TCP_ADDR" "$MYSQL_PORT_3306_TCP_PORT" 2>/dev/null && break
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment