Created
June 28, 2018 18:29
-
-
Save jordifebrer/28244dcadca81f3eaaeaaa7e8d358eb5 to your computer and use it in GitHub Desktop.
Waiting for a webserver container example
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
version: '3' | |
networks: | |
test_net: | |
services: | |
webserver: | |
image: nginx:alpine | |
command: sh -c 'sleep 10 && nginx -g "daemon off;"' | |
networks: | |
- test_net | |
test: | |
image: alpine | |
command: sh -c 'while ! nc webserver 80; do echo '.' && sleep 1; done && echo "Webserver up and running, bye bye..!"' | |
networks: | |
- test_net |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment