Tag: bower

鲍尔依赖于​​Docker上的postinstall

docker-compose在docker上使用postinstall在package.json中安装bower dependicies是可能的吗? package.json文件: { "name": "mongocrud", "version": "0.0.0", "private": true, "scripts": { "start": "node ./config/server.js", "postinstall": "node ./node_modules/bower/bin/bower install", "test": "mocha" }, "dependencies": { //dependicies } } Dockerfile: FROM node:7.7.2-alpine WORKDIR /application COPY package.json . COPY bower.json . COPY .bowerrc . RUN npm install -g bower RUN npm install COPY . . EXPOSE 3000 CMD […]

dotnet运行不会使用bower软件包

我有一个asp.net核心Web应用程序,我试图在Docker容器中运行。 从powershell,在项目文件,我可以运行> dotnet restore然后> dotnet run ,它会运行一个docker容器: PS E:\Projects\…> dotnet run Project MyProject (.NETCoreApp,Version=v1.1) was previously compiled. Skipping compilation. Hosting environment: Production Content root path: E:\Projects\… Now listening on: http://localhost:5000 Application started. Press Ctrl+C to shut down. 唯一的问题是,当我去localhost:5000 ,似乎像凉亭包(如Angular)没有安装。 当网页/控制器都工作时,Angular的前端将不会运行。 它没有返回404找不到,它只是没有绑定任何的Angular的东西。 如果我从Visual Studio(2015)运行相同的项目,它包含/运行Angular,不用担心,网站看起来应该如此。 查看源代码,你可以看到已经包含了angular度文件。 我的DockerFile是: FROM microsoft/aspnetcore-build WORKDIR /app COPY published . ENTRYPOINT ["dotnet", "MyProject.dll"] […]

使用docker和docker-compose来运行npm install和bower install

我正在尝试使用docker和节点映像来运行npm install和bower install 。 这里是我docker-compose.yml的相关部分: node: image: node:0.10.40 volumes: – ./package.json:/package.json – .bowerrc:/.bowerrc – ./bower.json:/bower.json – ./build/npm.tmp/node_modules:/node_modules – ./build/npm.tmp/bignibou-client/src/bower_components:/bignibou-client/src/bower_components command: bash -c "npm install && bower install" ports: – "8888:8888" 不幸的是我从节点得到以下错误: node_1 | bash: bower: command not found bignibousite_node_1 exited with code 127 指示命令没有正确解释。 我也尝试在我的package.json中使用post-script,如下所示: "scripts": { "postinstall": "/node_modules/bower/bin/bower install" } 这是我的.bowerrc : { "json": […]

如何构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 […]

无法在Docker容器中使用fig / crane执行git命令

我使用起重机来协调我的容器,并且我的项目资源(一个NodeJS应用程序)有一个git子模块。 当我尝试在我的项目根目录bower install时运行我的容器时,会发生此错误: bower jquery#~2.1.1 ECMDERR Failed to execute "git ls-remote –tags –heads git://github.com/jquery/jquery.git", exit code of #128 Additional error details: fatal: Not a git repository: ../../.git/modules/src/web 这是我的crane.ymlconfiguration文件: containers: db: dockerfile: images/db image: project/db run: detach: true web: dockerfile: images/web image: project/web run: volume: ["src/web:/src"] publish: ["8000:8000"] link: ["db:mongo"] detach: true 这是我的fig.yml db: build: images/db […]

Bower + Git子模块+ Docker组成

我有6个Git子模块,每个都有自己的Dockerfile 。 我已经安装了这个格式docker-compose.yml : a: build: A dockerfile: Dockerfile ports: – "9000:9000" b: build: B dockerfile: Dockerfile ports: – "3000:3000" c: build: C dockerfile: Dockerfile ports: – "3001:3001" 我的一些Dockerfiles有一个用于安装依赖关系的步骤,但是当发生这种情况时,会出现以下消息: 凉亭open-sans#〜1.1.0parsinggit://github.com/bungeshea/open-sans.git#~1.1.0 bower foundation#〜5.5.1 ECMDERR无法执行“git ls-remote –tags – “git://github.com/zurb/bower-foundation.git”,退出#128致命代码:不是git仓库:../.git/modules/C 其他错误的详细信息:致命的:不是一个混帐存储库:../.git/modules/C服务'networking'未能build立:命令'/ bin / sh -c npm安装&npm安装-g bower && bower安装 – allow-root && npm install -g gulp && gulp […]

在Docker容器内使用bower,并使用私有的repo依赖

我试图在docker-compose.yml容器中运行bower install ,作为docker-compose.yml的命令传递 docker-compose.yml中的相关代码: services: assets: build: ./src command: > sh -c ' bower install –allow-root; ' bower.json具有以下依赖性: { "name": "projectname", "version": "version", "dependencies": { "remote-repo": "ssh://git@remoterepo.url/repo.git#branch" } } 这个远程回购是私人的。 主机具有正确的SSH凭据以从该远程端口获取。 我已经尝试从我的主机传递SSH凭据到docker容器4或5种不同的方式,但每次尝试都给我同样的错误信息: docker_1 | bower repo#branch ECMDERR Failed to execute "git ls-remote –tags –heads ssh://git@remoterepo.url/repo.git", exit code of #128 Host key verification failed. fatal: Could […]