wait_for_url
The wait_for_url script waits indefinitely for a URL to respond with HTTP 200 (by default), so that pod creation can be paused until dependencies are ready.
Syntax
docker run --rm YOUR_DOCKER_REGISTRY/matrixx-toolbox:version wait_for_url url [--http-status status_code] [--sleep-interval sleep_interval]
Arguments
The wait_for_url script has the following argument:
- url
- The URL to wait for.
Options
The wait_for_url script has the following options:
- --http-status, -h status_code
- (Optional) The status to wait for, 200 by default.
- --sleep-interval, -i sleep_interval
- (Optional) The interval in seconds to wait between each check of the URL, 2 seconds by default.
- --help
- Display usage information and exit.
Usage
The following example checks every 5 seconds to see if example.org
returns HTTP status code 200.
docker run --rm YOUR_DOCKER_REGISTRY/matrixx-toolbox:version wait_for_url www.example.org --http-status 200 --sleep-interval 5