Raspberry pi上的Selenium / standalone-firefox docker不起作用

问题描述 投票:0回答:1

[我试图让docker在docker中运行一个Selenium / firefox独立容器,以便能够将其与R中的RSelenium一起使用,并在我的raspberry pi 3 B +上做一些报废。我设法使docker启动并运行。 hello-world运行以及ubuntu bash都有效(docker run -it ubuntu bash为我提供了ubuntu终端)。

我拉了最后一个独立的Firefox docker pull selenium/standalone-firefox,它起作用了。当我从终端运行时

 docker run -d -p selenium/standalone-firefox

它返回了我很长的数字,但是当我这样做的时候

 docker ps

没有列出容器。我无法在R中获得RSelenium与本地主机连接:

library(RSelenium)
remDr <- remoteDriver(remoteServerAddr = "localhost",port = 4445L, browserName = "firefox")
remDr$open()

Error in checkError(res)
Undefined error in httr call. httr output: Failed to connect to localhost port 4445: Connexion refused

这可与我的常规笔记本电脑配合使用。我在这里错了吗?

r selenium docker raspberry-pi rselenium
1个回答
0
投票

您没有完全使用docker。您实际上可以看到您的容器正在执行docker ps -a,但这不是很好。您指定了-p参数,并且未将任何端口传递给该参数。禁用该图像的官方文档,然后逐步尝试:

https://github.com/SeleniumHQ/docker-selenium

© www.soinside.com 2019 - 2024. All rights reserved.