Tag: grunt contrib connect

Gitlab runner:可以运行一个依赖于另一个的docker镜像

情况如下: 我需要运行grunt serve ,在使用docker容器的持续集成过程中,在localhost:9000中为我的应用程序grunt serve服务,然后运行另一个容器,使用localhost:9000中提供的应用程序执行集成testing: 我的gitlab.yml文件 unit-testing: image: karma-testing script: – npm install && bower install && karma start && grunt serve cache: paths: – node_modules/ – bower_components/ behavior-testing: image: protractor-ci script: – npm install protractor-cucumber-framework cucumber && xvfb-run –server-args='-screen 0 1280x1024x24' protractor protractor.conf.js cache: paths: – node_modules/ – bower_components/ 第一个图像运行在本地主机:9000服务我的应用程序的grunt serve任务,我希望第二个图像使用这个正在运行的应用程序来运行另一个脚本。

如何在Docker容器中运行grunt-connect

我有Grunt在docker容器中的localhost:8080上运行节点连接(grunt-contrib-connect)web服务器。 我用这个命令运行容器: $ docker run –rm -it -p 8080:8080 js1972/yeoman:v3 。 在我的容器中,我用grunt develop运行grunt连接任务。 我在Mac上使用boot2docker。 boot2docker ip说主机IP是192.168.59.103所以我应该访问连接服务器与http://192.168.59.103:8080在我的浏览器。 但是,这是行不通的,我只是得到一个Safari浏览器无法连接到服务器消息。 (请注意,当我使用一个简单的python web服务器时,端口转发工作正常,就像docker网站上的例子一样)。 任何想法是什么错在这里? 在Docker之外,相同的过程完全可以工作。 我有一种感觉,它与在本地主机上运行Connect有关。 我已经尝试过–add-hosts和-p localhost:8080:8080等各种组合,无济于事… 如果这有助于我的docker文件和gruntfile: https : //dl.dropboxusercontent.com/u/7546923/Dockerfile https://dl.dropboxusercontent.com/u/7546923/Gruntfile.js Rgds,Jason。