Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leberkleber/wait-until-curl
Dockerfile which wait until curl response become to expected value
https://github.com/leberkleber/wait-until-curl
curl docker health healthcheck sh tool wait wait-for-it
Last synced: 3 days ago
JSON representation
Dockerfile which wait until curl response become to expected value
- Host: GitHub
- URL: https://github.com/leberkleber/wait-until-curl
- Owner: leberKleber
- License: apache-2.0
- Created: 2019-01-14T14:24:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-15T10:26:59.000Z (almost 6 years ago)
- Last Synced: 2024-11-07T21:35:48.314Z (about 2 months ago)
- Topics: curl, docker, health, healthcheck, sh, tool, wait, wait-for-it
- Language: Shell
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wait-until-curl
Dockerfile which wait until curl response become to expected value## Environment Variables
`WUC_URL`This is the url which would be called to check the truthiness of the expected valued. Can be prefixed with http or https.
e.g.:
- https://myService:8080/internal/health
- myService/health`WUC_WRITE_OUT`
String which would be compared with the expected value (see: WUC_EXPECTED). Must be written in curl '--write-out' format.
For more Information see https://manpages.debian.org/stretch/curl/curl.1.en.html#OPTIONS > --write-out.
e.g.:
- %{status_code}`WUC_EXPECTED`
Value which expected as 'WUC_WRITE_OUT' result
e.g.:
- 200
- 201`WUC_SLEEP_TIME`
Sleep time in seconds between requests. Default 1
`WUC_MAX_INTERATION`
Max retries to reach expected value. Default -1 (endless)
## Example
```bash
docker run --rm -e "WUC_EXPECTED=200" -e "WUC_WRITE_OUT=%{http_code}" -e "WUC_URL=http://myservice:8080/internal/health" --network "myservice_default" leberkleber/wait_until_curl
```