Reputation: 85
Browsers.json file
{
"chrome": {
"default": "latest",
"versions": {
"latest": {
"image": "selenoid/chrome:latest",
"port": "4444",
"path": "/"
}
}
}
}
Docker image 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
Docker compose file
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":[]}
I am running this using docker vm created by lima. When I run the tests it says the below error
selenium.common.exceptions.SessionNotCreatedException: Message: create container: Error response from daemon: No such image: selenoid/chrome:latest
Even though I have selenoid/chrome:latest, selenoid is not able to connect to it and throws not found error. But it works with docker desktop. What config , I am missing here?
Upvotes: 0
Views: 2192
Reputation: 11
Try to use custom docker network. Like this:
networks:
app:
external:
name: app
Network should be already exist You can do it via command
docker network create app
After that add this network to your service:
networks:
app: null
For more information use this tutorial: Tutorial
Upvotes: 0