Install command fails with error related to Git inside Docker

What is the current behavior?
When fetching packages with yarn inside Docker, the command fails caused by a Git error.
I don’t think the problem is related to any specific package, but rather the yarn command or something else.

Should I install Git separately before using yarn? That seems to solve to problem, but I would think that’s handled by yarn itself. Git is not installed within the base Docker image (node-alpine).

error Couldn't find the binary git

Image of the error

package.json

Dockerfile

Full log when running with verbose flag

Steps to reproduce the behavior:

  1. Build the docker image.
  2. An error is being shown mid-way fetching the packages.

What is the expected behavior?
Successfully install the packages without installing git beforehand inside the Docker image.

System:

  • OS: MacOS
  • Docker: 18.09.0
  • Node: 11.4.0
  • Yarn: 1.12.3

Author: Fantashit

1 thought on “Install command fails with error related to Git inside Docker

Comments are closed.