dicer instance wait
Waits until each instance stops and prints the status its guest ended with, a line for each: the workload’s exit code, 0 for a guest that powered itself off, or 125 for one that ended without saying how.
An instance that has already stopped is not waited for. Its last status is reported at once. An instance its restart policy starts again has not stopped, so the wait goes on.
An instance that --rm has deleted cannot be waited for. To read the status
of a job run with -d, leave out --rm, and delete the job after the wait.
As with docker wait, the statuses are printed, not exited with: the command fails only for an instance it cannot wait for.
With --condition healthy, it waits instead until each instance’s health
check passes, and prints nothing. An unhealthy instance is waited for,
since a later probe or a restart can make it healthy. The command fails for
an instance with no health check, one that is not running, and one that
stops first.
Usage
$ dicer instance wait NAME... [flags]
Examples
$ dicer wait web
$ dicer wait job1 job2
$ dicer wait --timeout 30s web
$ dicer wait --condition healthy --timeout 2m web
$ status=$(dicer wait job)
Flags
| Flag | Description |
|---|---|
--condition string | What to wait for: stopped or healthy. Default: stopped. |
--timeout duration | Give up after this long (0: wait indefinitely). |
Global flags
| Flag | Description |
|---|---|
-D, --debug | Trace every call to the daemon on stderr (or set $DICER_DEBUG). |
-r, --remote string | Daemon to talk to: a remote’s name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local). |
--request-timeout duration | Give up on a single call to the daemon after this long, e.g. 30s (0: never; streams such as logs -f and exec are not bounded). |