wait_for_host_port
The wait_for_host_port script waits indefinitely for a port on a given host to become available, indicating that dependencies are ready for pod creation.
Syntax
docker run --rm YOUR_DOCKER_REGISTRY/matrixx-toolbox:version wait_for_host_port host_name port_number [--sleep-interval sleep_interval]
Arguments
The wait_for_host_port script has the following arguments:
- host_name
- The host where the port is located.
- port_number
- The port number.
Options
The wait_for_host_port script has the following options:
- --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 if localhost
port 8080 is available every 5
seconds.
docker run --rm YOUR_DOCKER_REGISTRY/matrixx-toolbox:version wait_for_host_port localhost 8080 --sleep-interval 5