https://github.com/theypsilon/docker-waitfortrue
https://github.com/theypsilon/docker-waitfortrue
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/theypsilon/docker-waitfortrue
- Owner: theypsilon
- Created: 2016-05-23T07:03:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-23T07:05:11.000Z (about 10 years ago)
- Last Synced: 2025-03-27T06:24:58.963Z (over 1 year ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wait For True
### Example
```
$ docker run --rm theypsilon/waitfortrue:1.0.0 curl --head www.google.com
WAITING FOR [curl --head www.google.com] during 100 seconds
OK
```
##### Debug mode
```
$ docker run --rm -e DEBUG=true theypsilon/waitfortrue:1.0.0 curl --head www.google.com
WAITING FOR [curl --head www.google.com] during 100 seconds
DEBUG ON
HTTP/1.1 200 OK
Date: Mon, 23 May 2016 06:58:14 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
P3P: CP="This is not a P3P policy! See https://www.google.com/support/accounts/answer/151657?hl=en for more info."
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Set-Cookie: NID=79=DNXrr_uEHM4AuHsKs04608AjkNaA71LK_wkYMhd8hjXCdJBBpaDI3GiwpXHsIdEBIaNbhtFDR4PABL-8MQX3OOrOuPfVCWpu6Pk5X63Avrn3ZvL1ZsfKF0E52xCsJ5-9wfCtxv-gdfnFYdE; expires=Tue, 22-Nov-2016 06:58:14 GMT; path=/; domain=.google.com; HttpOnly
Transfer-Encoding: chunked
Accept-Ranges: none
Vary: Accept-Encoding
OK
```
##### Modifying timeout (default value is 100 seconds)
```
$ docker run --rm -e TIMEOUT_SECONDS=5 theypsilon/waitfortrue:1.0.0 curl --head wrong.google.com
WAITING FOR [curl --head wrong.google.com] during 5 seconds
..!!
FAILED: timeout triggered after 5 seconds
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: wrong.google.com
```