2017-09-13 564 views
0

我对docker非常陌生,所以这可能是一个简单的修复。

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

第1步工作正常。

  • C:\用户\维基>搬运工拉sitespeedio/sitespeed.io

步骤2没有。

  • C:\用户\维基>搬运工运行--rm -v “$(PWD)”:/ sitespeed.io sitespeedio/sitespeed.io https://www.sitespeed.io -b火狐

这导致错误,我正在寻找帮助。具体做法是:

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'. 

所以从塔伦运行命令按照建议: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 
+4

尝试'-v “%CD%”:/ sitespeed.io',看看它是否工作 –

+0

'$(PWD)'是一个UNIX命令替换。它在Windows命令行上没有任何意义。 (它实际上不是一种在UNIX上做事情的好方法;人们应该使用'“$ PWD”'来代替,这样做效率更高)。 –

回答

0

尝试使用 “”而是意味着使用当前目录。更新的例子则是这样的:

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