我有一个节点应用程序,我可以从node server.js开始并访问localhost:9000。 我有一系列selenium运行良好的e2etesting,但我现在正在寻找使用docker selenium镜像。 我使用docker run -d -p 4444:4444 selenium/standalone-chrome启动Docker镜像 我将e2etesting代码改为: var driver = new webdriver.Builder(). usingServer('http://127.0.0.1:4444/wd/hub'). withCapabilities(webdriver.Capabilities.chrome()). build(); // driver.manage().window().setSize(1600, 1000); return driver.get('http://127.0.0.1:9000') .then(function() { // driver.executeScript('localStorage.clear();') return driver }); 但是selenium根本无法连接到应用程序! (如果我取消setSize行的注释,程序就会在那里失败) 我有服务器运行,它确实可以在localhost:9000访问。 我怎样才能让我的testing正确使用dockerizedselenium,并正确地指向本地主机上的服务器?
我想为一个离子项目启用连续交付。 我将使用使用Docker镜像的Bitbucketpipe道 。 我混淆了哪个Docker镜像应该用于容器。 这是足够的节点图像还是我需要一个Ubuntu的图像? 我可能不得不创造我自己的形象,但应该是这个形象的基础。 在运行端到端testing之前,我将不得不运行一些命令。 例如: 从git master分支拉 npm安装 npm install -g cordova离子 凉亭安装 运行一个吞咽任务 运行量angular器testing 离子项目也作为一个webapp发布,我把它部署到Ubuntu 16.04服务器上(但是和ngnix一起服务),这让我觉得在dev和prod中拥有相同的环境是一个好主意。 所有这一切,我的Docker基础镜像应该是什么? 节点:硼 Ubuntu的:16.04 如果两个都是有效的选项不会比Ubuntu更快地构build节点映像?
我的问题是如何在Docker容器中运行谷歌浏览器进行e2etesting。 我从官方的Jenkins图像创buildDockerfile ,但是当试图运行谷歌浏览器时,它崩溃并显示错误: Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted Trace/breakpoint trap (core dumped) Jenkinsdocker工人使用Debian jessie 。 我可以用–headless标志运行谷歌–headless ,而不需要X服务器。 这是我的docker文件: https://github.com/ripper2hl/jenkinswithchrome jenkins官方形象: https://github.com/jenkinsci/docker 回购一个人用Docker运行谷歌浏览器的GUI: https://github.com/jessfraz/dockerfiles/blob/master/chrome/stable/Dockerfile 我的第一个方法是使用xvbf ,但是使用 – 无–headless标志的过程更简单。 https://gist.github.com/addyosmani/5336747 我可以在Ubuntu服务器上运行chrome来安装相同的命令,但在docker中失败。 在其他意图之后,我使用了–no-sandbox标志,但是docker图像显示了下一个错误。 [0427/180929.595479:WARNING:audio_manager.cc(295)] Multiple instances of AudioManager detected [0427/180929.595537:WARNING:audio_manager.cc(254)] Multiple instances of AudioManager […]