我对docker很新,所以这可能是一个简单的修复。
我正在尝试通过在Windows 10计算机上跟踪他们的文档来启动并运行sitespeed.io的实例,该计算机具有默认安装的Docker - 不使用Windows容器,C是共享的。安装步骤:{{3 }}
第1步工作正常。
第2步没有。
这导致我正在寻求帮助的错误。具体做法是:
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'.
按照Tarun的建议运行命令:https://www.sitespeed.io有效。
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
答案 0 :(得分:0)
尝试使用"。"相反,这意味着使用当前目录。更新后的示例如下所示:
docker run --rm -v .:/sitespeed.io sitespeedio/sitespeed.io https://www.yahoo.com -b firefox
答案 1 :(得分:0)
这是因为该命令无法在您当前的工作目录中找到文件夹“ sitespeed.io”。运行如下命令:
docker run --rm -v "$(pwd)" sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
如果您使用的是Windows计算机,请尝试执行以下操作
docker run --rm -v "${pwd}":/sitespeed.io sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
答案 2 :(得分:0)
请尝试以下:
C:\Users\Vicky> docker run --shm-size=1g --rm -v "$(pwd)":/Users/Vicky sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox>
您需要提供当前的工作目录路径来代替 sitespeed.io
C:\Users\Vicky> docker run --shm-size=1g --rm -v "$(pwd)":/Users/Vicky sitespeedio/sitespeed.io {{3 }} -b 火狐