Tag: docker gruntjs

如何构build一个同步源代码的docker容器?

我想为nodejs-bower-grunt构build一个容器,但是保持我的源代码与git仓库(在这种情况下是Bitbucket)同步。 这个想法是为我的团队提供一个容器,以便每个开发人员不需要在他们的环境中安装这些包。 而不是安装nodejs,bower和grunt来运行应用程序的前端,他们只是使用容器来pipe理它们,并专注于源代码。 所以这是我的DockerFile: FROM ubuntu:14.04 RUN apt-get update RUN apt-get install -y nodejs npm git git-core RUN ln -s /usr/bin/nodejs /usr/bin/node WORKDIR /app ADD package.json /app/ ADD bower.json .bowerrc* /app/ RUN npm install -g bower RUN npm install -g grunt-cli RUN npm install RUN bower install –allow-root CMD ["grunt", "serve"] EXPOSE 9000 EXPOSE 35729 […]