I have 6 git sub-modules each with their own Dockerfile
. I've setup my 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 for bower to install the dependencies, but when this happens it errors out with the following message:
bower open-sans#~1.1.0 resolve git://github.com/bungeshea/open-sans.git#~1.1.0 bower foundation#~5.5.1 ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/zurb/bower-foundation.git", exit code of #128 fatal: Not a git repository: ../.git/modules/C
Additional error details: fatal: Not a git repository: ../.git/modules/C Service 'web' failed to build: The command '/bin/sh -c npm install && npm install -g bower && bower install --allow-root && npm install -g gulp && gulp build' returned a non-zero code: 1
I had the same issue when using bower inside a Docker container, which was composed with docker-compose. This workaround did it for me (although this is not really satisfying):
GIT_DIR=/tmp bower install --allow-root
This pull request should fix it, but has not been merged yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With