Skip to content

Instantly share code, notes, and snippets.

@jordifebrer
Created June 28, 2018 18:29
Show Gist options
  • Save jordifebrer/28244dcadca81f3eaaeaaa7e8d358eb5 to your computer and use it in GitHub Desktop.
Save jordifebrer/28244dcadca81f3eaaeaaa7e8d358eb5 to your computer and use it in GitHub Desktop.
Waiting for a webserver container example
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