public function createClient($url = null)
    {
        if ($url === null) {
            $url = 'unix:///var/run/docker.sock';
        }

        $browser = $this->browser;

        if (substr($url, 0, 7) === 'unix://') {
            // send everything through a local unix domain socket
            $browser = $this->browser->withSender(
                Sender::createFromLoopUnix($this->loop, $url)
            );

            // pretend all HTTP URLs to be on localhost
            $url = 'http://localhost/';
        }

        return new Client($browser->withBase($url));
    }