Browsers.json 文件
{
"chrome": {
"default": "latest",
"versions": {
"latest": {
"image": "selenoid/chrome:latest",
"port": "4444",
"path": "/"
}
}
}
}
Docker 镜像 ls
REPOSITORY TAG IMAGE ID CREATED SIZE
selenoid/chrome latest 6c08b8cfe30e 3 weeks ago 1.14GB
aerokube/selenoid latest fdc2ce7d1eb8 3 months ago 16.2MB
码头工人撰写文件
version: '3'
services:
selenoid:
image: "aerokube/selenoid"
network_mode: bridge
ports:
- "4000:4444"
volumes:
- ".:/etc/selenoid/" # assumed current dir contains browsers.json
- "/var/run/docker.sock:/var/run/docker.sock"
command: ["-conf", "/etc/selenoid/browsers.json","-log-output-dir", "/opt/selenoid/logs"]
http://localhost:8086/status
{"state":{"total":5,"used":0,"queued":0,"pending":0,"browsers":{"MicrosoftEdge":{"latest":{}},"chrome":{"latest":{}},"firefox":{"latest":{}}},"videos":null},"origin":"http://selenoid:4444","browsers":{"MicrosoftEdge":0,"chrome":0,"firefox":0},"sessions":{},"version":"1.10.4[2021-10-10_08:53:47AM]","errors":[]}
我正在使用由 lima 创建的 docker vm 运行它。当我运行测试时,它说以下错误
selenium.common.exceptions.SessionNotCreatedException: Message: create container: Error response from daemon: No such image: selenoid/chrome:latest
即使我有 selenoid/chrome:latest,selenoid 也无法连接到它并抛出未找到错误。但它适用于 docker 桌面。什么配置,我在这里失踪了?