public static function curlPath($toPath, $paths = null, $dockerEnv = "")
    {
        if (!$paths) {
            $paths = new Paths();
        }

        if (!$dockerEnv) {
            $dockerEnv = self::CURL_CHECK_FILE;
        }
        $serverName = self::serverName();

        if ($paths->domainNameIsWeb($serverName)
            || ($paths->domainNameIsLocalHost($serverName) && $paths->checkForEnvironmentFile($dockerEnv))
        ) {
            $serverName = $paths->getDomainNameWeb();
        }

        return self::httpProtocol() . '://' . $serverName . DIRECTORY_SEPARATOR . ltrim($toPath, DIRECTORY_SEPARATOR);
    }