Bower + Git submodules + Docker make up

I have 6 git submodules, each with its own Dockerfile . I installed docker-compose.yml in this format:

 a: build: A dockerfile: Dockerfile ports: - "9000:9000" b: build: B dockerfile: Dockerfile ports: - "3000:3000" c: build: C dockerfile: Dockerfile ports: - "3001:3001" 

A couple of my Dockerfiles have a step to install bower to install dependencies, but when that happens, it will result in an error with the following message:

bower open-sans # ~ 1.1.0 solve git: //github.com/bungeshea/open-sans.git#~1.1.0 bower base # ~ 5.5.1 ECMDERR Failed to execute "git ls-remote --tags - -heads git: //github.com/zurb/bower-foundation.git ", exit code from # 128 is fatal: not a git repository: ../. git / modules / C

Additional error information: fatal: Not git repository: .. /.git/modules/C Service 'web' could not be created: command '/ bin / sh -c npm install && & &&&& npm install -g bower && & bower installation --allow-root && npm install -g gulp && & & gulp build 'returns a non-zero code: 1

+5
source share
2 answers

I had the same problem when using the gazebo inside the Docker container, which was compiled using docker-compose. This workaround did this for me (although this is not very satisfactory):

 GIT_DIR=/tmp bower install --allow-root 

This transfer request should fix it, but has not yet been merged.

+2
source

I don’t know if you have tried this already, but try the following command:

 git config --global url."https://".insteadOf git:// 

If this does not work, you can try to configure the proxy server in the .bowerrc file.

Found some links here and here

+1
source

Source: https://habr.com/ru/post/1239526/


All Articles