public function wait(?string $id, string $condition = 'not - running')
    {
        $url = self::$base_url.'/'.($id ?? $this->container_id).'/wait?'.http_build_query(compact('condition'));

        return self::$curl->post($url);
    }
public function wait(?string $id, string $condition = 'not - running')
    {
        $url = self::$base_url.'/'.($id ?? $this->container_id).'/wait?'.http_build_query(compact('condition'));

        return self::$curl->post($url);
    }
public function wait ( ? string $ id , string $ condition = 'not - running' ) { $ url = self :: $ base_url . '/' . ( $ id ?? $ this -> container_id ) . '/wait?' . http_build_query ( compact ( 'condition' ) ) ; return self :: $ curl -> post ( $ url ) ; }
Wait for a container.

Block until a container stops, then returns the exit code.

@param string|null $id
@param string      $condition wait until a container state reaches the given condition,
either 'not - running'(default), 'next - exit', or 'removed'

@return mixed 200

@throws Exception
Wait for a container .