Chromedriver无法与Alpine基本Docker映像一起使用

时间:2019-03-20 06:45:00

标签: docker selenium-webdriver webdriver selenium-chromedriver alpine

我有一个应用程序,该应用程序使用基于高山的图像,并且我在给定目录(/usr/bin/chromedriver/linux64/2.45/chromedriver)中具有755权限的Chrome驱动程序。

我得到以下给定的错误:

chromedriver-docker-example_1  | 2019-03-20 05:05:50.316 ERROR 21 --- [ null to remote] org.openqa.selenium.os.OsProcess         : org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "/usr/bin/chromedriver/linux64/2.45/chromedriver" (in directory "."): error=2, No such file or directory)

可以请任何人帮忙吗?

1 个答案:

答案 0 :(得分:0)

我能够解决这个问题,对于高山地区,我们需要安装铬驱动器,铬。在给定的命令下面添加以进行设置。

.s2i/bin/assemble

然后将驱动程序路径指向/ usr / bin / chromedriver。 这应该可以解决给定的问题。