Tag: 量angular器

Docker-selenium-chrome查看浏览器

我是新来的docker工,一直在搞Docker和selenium电网一个星期。 这是我做的事情, 为Selenium网格和Google Chrome创build了一个容器。 修改我的量angular器脚本并将其指向步骤1中创build的集线器 我可以看到使用docker logs <container-name>的chrome驱动程序日志 我的问题是,脚本运行时,我能看到浏览器吗?

build立docker图像与angular2,jupyter和打字稿

我想编写一个交互式教程来教导一个团队如何使用Typescript和Angular 2,但我不希望每个人都安装Jupyter。 所以,我想build立一个有所需要的docker图像。 这是我的Dockerfile到目前为止,但我不知道在哪里复制从快速启动 package.json所以npm install将find它,做安装,并让Jupyterfind它。 FROM jupyter/minimal-notebook MAINTAINER Jupyter Project <jupyter@googlegroups.com> USER root RUN apt-get update && \ apt-get install -y –no-install-recommends && \ apt-get install -y npm nodejs nodejs-legacy wget locales git \ fonts-dejavu \ gcc && apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN npm install –save jupyter-js-plugins USER $NB_USER 我想从github中为Typescript添加这个插件 。 […]

你如何使用Docker在Windows上设置selenium网格?

我已经采取的步骤 1.下载并安装Docker Toolbox for windows 2.打开Docker快速入门terminal 3.input以下命令从dockerhub中拖出泊坞窗图像并运行它们 docker pull selenium/hub docker pull selenium/node-chrome docker pull selenium/node-firefox docker run -d -P \–name hub selenium/hub docker run -d –link hub:hub -P \–name chrome selenium/node-chrome docker run -d –link hub:hub -P \–name firefox selenium/node-firefox 当我inputdocker logs hub时它似乎正在运行,但是我无法使用我的conf.js文件中的seleniumAddress将我的testing路由到virtualbox VM上的集线器地址,或者使用http:// ipAddress:4444 / grid / console 。 理想情况下,我想使用这个设置来扩大我可以运行的并行testing实例的数量。

如何configuration`ng serve`来捕获dockersized Angular 2应用程序中的更改?

我是'dockersizing'(我希望这是一个正确的术语)现有的Angular 2应用程序,运行在angular-cli (1.0.0-beta.31)上。 我正在努力find一种方法来使ng serve捕捉,每当我更新我的工作目录中的文件,因此 – 刷新我的应用程序(像往常一样)。 否则,我需要每次更改文件时都需要docker-compose up –build … 编辑 :我正在探索的想法是添加一个卷。 这是我的Dockerfile : # Dockerizing Angular 2 Client App # @link: https://scotch.io/tutorials/create-a-mean-app-with-angular-2-and-docker-compose # Create image based on the official Node 7 image from dockerhub FROM node:7 # Create a directory where our app will be placed RUN mkdir -p /usr/src/app # Change directory […]

是否可以使用Netflix的Spinnaker部署Docker容器?

我不知道Spinnaker( http://spinnaker.io )是否可以用于Docker容器部署? 我们所做的是: 戳回购 如果代码是新的 – 我们build立了3个容器(nginx,django应用程序容器,fluentdlogging器容器) 我们正在转动fluentd容器,以便从其余两个容器中收集日志并将其发送到Splunk / AWS Cloudwatch日志 我们想在同一个主机 – nginx容器(作为Django容器的代理)上启动django应用程序容器[并将日志转发到fluentd] 我们转发(映射)具有应用程序configuration的Django文件到Django容器中 不幸的是三angular帆的例子太less,他们在这里的例子只显示了如何用特定的DEB软件包来烘烤图像。 我们有jenkins工作,可以轮询回购,testing代码,创build和上传docker容器到私人registry,并使用安全的部署容器。 问题是如果我们可以使用三angular帆为了做到这一点本地?

Docker中的端口转发的Rails应用似乎会导致CSRFexception

我有一个在Docker容器中运行的Rails应用程序,它被分配了一个IP 172.17.0.3 。 对主机51.xxx传入请求被转发到172.17.0.3的rails应用程序。 更具体地说,这是这样做的: docker run -p 8080:8080 rails_app 但是,Rails应用程序抛出当用户尝试访问某些页面时Can't verify CSRF token authenticity错误。 我怀疑Rails认为传入的请求是攻击,因为目标的ip不匹配Rails应用程序的ip – 即用户请求被引导到主机51.xxx ,而Rails的实际位置是172.17.0.3 有什么办法让我告诉Rails这些请求是合法的吗? 作为附加信息,我使用devise进行身份validation,并使用unicorn作为服务器。 你们中的一些人可能会试图build议将protect_from_forgery with: :exception更改protect_from_forgery with: :exception :null_session ,但是如果没有放在代理之后,应用程序就可以正常工作。 另外,当我改变那个部分的时候,一些逻辑将不起作用,因为我认为这个设置是以处理用户会话的方式出现的。 这是我的networking的布局: (user from public network) —-> (proxy) —-> (rails app on a private network) (202.xxx) (51.xxx) (172.xxx) 编辑:该应用程序在development设置。 这是我在log/development.log文件中得到的错误。 Started POST "/register" for 202.xxx at 2014-11-18 […]

Docker selenium / node-chrome – 量angular器找不到Chrome二进制文件

我是Docker的新手,但不是E2E量angular器。 我正在尝试从Docker容器中构buildE2E集成。 遵循使用Docker的Angular的量angular器菜谱 他们有第2步 – 启动selenium节点 docker run -d –link selenium-hub:hub selenium/node-chrome:latest 我了解Selnium Grid的function – 它允许通过与网格进行通信来testing不同types的浏览器。 当我有这个docker容器运行Protactor不使用它作为铬二进制文件,我得到WebDriverError: unknown error: cannot find Chrome binary 。 我如何使量angular器使用此node-chrome容器,而不是本地铬二进制文件? 我的量angular器configuration: exports.config = { framework: 'mocha', directConnect: true, seleniumAddress: 'http://localhost:4444/wd/hub', // I have this set to the grid docker container from Angular cookbook specs: ['./stories/*.js'], onPrepare: function() { expect = […]

如何在Docker容器中启动一个宽浏览器,进行量angular器testing

在Docker容器中运行端到端testing时,我们需要浏览器很宽,以确保位于最右边的元素(aButton)实际上是可见的,并且像testing一样 expect(mainPage.aButton.isDisplayed()).toBeTruthy(); 成功。 当显示浏览器宽度时,我们总是得到一个最接近1050的值: browser.driver.manage().window().getSize().then(function(size) { console.log('browser size', size); }); 显示: browser size { height: 748, width: 1050, class: 'org.openqa.selenium.Dimension', hCode: 436207616 } 当使用这两个docker镜像运行testing时,由于button不可见,所以它们失败。 在不在Docker / Xvfb中的浏览器上运行testing时,没有任何问题。 https://registry.hub.docker.com/u/caltha/protractor/ 通过链接一个像这样的本地版本(和一些用于debugging的日志文件夹)来修改Xvfbconfiguration的设置。 mkdir -p /tmp/docker/protractor/supervisor docker run –rm \ –name run_protractor \ -v /tmp/docker/protractor:/var/log \ -v /tmp/testproject:/project \ -v /tmp/xvfb.conf:/etc/supervisor/conf.d/xvfb.conf:ro \ caltha/protractor Xvfb设置文件xvfb.conf: [program:xvfb] command = Xvfb :1 […]

在Docker中运行Angular2应用程序

我试图在docker中运行我的ng2应用程序。 我有Docker文件: FROM ubuntu:latest RUN apt-get update #Install curl & git RUN apt-get -qq -y install curl RUN apt-get install -yqq git #Download and install nodejs-6 RUN curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh RUN bash nodesource_setup.sh RUN apt-get install -yqq nodejs RUN apt-get install -yqq build-essential RUN npm install -g angular-cli #Clone the project RUN git […]

在Angular2应用程序中使用Docker环境variables

我想在Angular-Cli(1.0.0-beta.16)的'environment.prod.ts'中使用预定义的Docker Environmentvariables。 用例: environment.prod.ts: export const environment = { production: true, host1: $ENV1, //specific service endpoint goes here host2: $ENV2 //specific service endpoint goes here }; 我的Angular基于CLI的应用程序依赖于environment.prod.ts来获取有关后端服务(host1,host2)和应用程序的主机信息经历了DEV,TEST,QA,PROD等各种环境… 在Docker运行期间提供$ ENV1,$ ENV2作为环境variables 这可能吗 ? 如果没有,请纠正我的理解和build议任何其他的替代解决scheme