Windows 10 Docker Sitespeed.io错误:“$(pwd)”包含本地卷名称的无效字符

我对docker很新,所以这可能是一个简单的修复。

我试图让一个Sitepeed.io的实例启动并运行,通过在默认安装Docker的Windows 10计算机上按照他们的文档 – 不使用Windows容器,C是共享的。安装步骤: https:// www。 sitespeed.io/documentation/sitespeed.io/installation/#windows-1

第1步工作正常。

  • C:\ Users \ Vicky> docker pull sitespeedio / sitespeed.io

步骤2没有。

  • C:\ Users \ Vicky> docker run –rm -v“$(pwd)”:/ sitespeed.io sitespeedio / sitespeed.io https://www.sitespeed.io -b firefox

这导致我正在寻找帮助的错误。 特别:

C:\WINDOWS\system32>docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run --help'. 

所以根据塔伦的build议运行命令: https : //stackoverflow.com/users/2830850/tarun-lalwani工程。

 docker run --rm -v "%cd%":/sitespeed.io sitespeedio/sitespeed.io http: //www.yahoo.com -b firefox (Space added to URL so you can see the full string.) 

现在它产生以下错误…

 docker run --rm -v "%cd%":/sitespeed.io sitespeedio/sitespeed.io https://www.yahoo.com -b firefox Google Chrome 60.0.3112.78 Mozilla Firefox 54.0 [2017-09-13 22:58:56] INFO: Versions OS: linux 4.9.41-moby nodejs: v6.11.1 sitespeed.io: 5.5.0 browsertime: 1.6.1 coach: 0.36.0 [2017-09-13 22:58:57] INFO: Starting firefox for analysing https://www.yahoo.com 3 time(s) [2017-09-13 22:58:57] Testing url https://www.yahoo.com run 1 [2017-09-13 22:59:39] Catched a WebDriverError [Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com.]. Try one more time.WebDriverError: Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com. [2017-09-13 23:00:20] WebDriverError:WebDriverError: Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com. [2017-09-13 23:00:20] Could not load URLUrlLoadError: Failed to load https://www.yahoo.com, cause: Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com. [2017-09-13 23:00:21] ERROR: https://www.yahoo.com generated the following error in Browsertime UrlLoadError: Failed to load https://www.yahoo.com at BrowsertimeError (/usr/src/app/node_modules/browsertime/lib/support/errors.js:5:5) at UrlLoadError (/usr/src/app/node_modules/browsertime/lib/support/errors.js:19:5) at getUrl.then.then.catch.catch.e (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:175:15) From previous event: at SeleniumRunner.loadAndWait (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:173:13) at Promise.resolve.tap.tap.tap.tap.tap (/usr/src/app/node_modules/browsertime/lib/core/engine.js:281:27) From previous event: at runIteration (/usr/src/app/node_modules/browsertime/lib/core/engine.js:281:10) at Promise.reduce (/usr/src/app/node_modules/browsertime/lib/core/engine.js:357:27) From previous event: at Promise.resolve.tap.tap.tap.tap.result (/usr/src/app/node_modules/browsertime/lib/core/engine.js:354:17) at runCallback (timers.js:672:20) at tryOnImmediate (timers.js:645:5) at processImmediate [as _immediateCallback] (timers.js:617:5) From previous event: at Engine.run (/usr/src/app/node_modules/browsertime/lib/core/engine.js:353:8) at engine.start.then (/usr/src/app/lib/plugins/browsertime/analyzer.js:95:26) From previous event: at Object.analyzeUrl (/usr/src/app/lib/plugins/browsertime/analyzer.js:95:8) at storageManager.createDirForUrl.then.then (/usr/src/app/lib/plugins/browsertime/index.js:179:32) at /usr/src/app/node_modules/mkdirp/index.js:30:20 at FSReqWrap.oncomplete (fs.js:123:15) From previous event: at Object.processMessage (/usr/src/app/lib/plugins/browsertime/index.js:179:12) at queue.process.message (/usr/src/app/lib/support/queueHandler.js:183:32) at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:92:21) at Immediate.drain (/usr/src/app/node_modules/concurrent-queue/index.js:73:84) at runCallback (timers.js:672:20) at tryOnImmediate (timers.js:645:5) at processImmediate [as _immediateCallback] (timers.js:617:5) [2017-09-13 23:00:21] ERROR: TypeError: Cannot read property 'getItems' of undefined at Object.summarize (/usr/src/app/lib/plugins/assets/aggregator.js:103:49) at Object.processMessage (/usr/src/app/lib/plugins/assets/index.js:40:36) at queue.process.message (/usr/src/app/lib/support/queueHandler.js:183:32) at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:92:21) at Immediate.drain (/usr/src/app/node_modules/concurrent-queue/index.js:73:84) at runCallback (timers.js:672:20) at tryOnImmediate (timers.js:645:5) at processImmediate [as _immediateCallback] (timers.js:617:5) [2017-09-13 23:00:21] INFO: Render HTML for 1 page(s) [2017-09-13 23:00:21] INFO: HTML stored in /sitespeed.io/sitespeed-result/www.yahoo.com/2017-09-13-22-58-56 [2017-09-13 23:00:21] INFO: Finished analysing https://www.yahoo.com 

尝试使用“。” 而是意味着使用当前目录。 更新后的示例如下所示:

 docker run --rm -v .:/sitespeed.io sitespeedio/sitespeed.io https://www.yahoo.com -b firefox