Last active
March 8, 2018 20:06
-
-
Save lhriley/3cf8bee129f643bfda76d5219f63aa5a to your computer and use it in GitHub Desktop.
Wait for docker container, then watch logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| service="CONTAINER_NAME"; echo "waiting for docker container '${service}' "; while [[ ! $(docker ps | grep "${service}") ]]; do echo -n "."; sleep 1; done; docker logs -f $(docker ps -a | grep "${service}" | head -n1 | awk '{print $1}'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment