Git clone verbose output?

GitGit CloneDocker BuildVerbose

Git Problem Overview


I have to clone a couple of big repos in my Dockerfile. It really can take an hour to clone a single repo and I want to see standard Git progress output to understand what's going on.

However, when Git is started from the Dockerfile, I see no git clone output whatsoever. The only thing printed to console is:

Cloning into '/root/lib/opencv'...
POST git-upload-pack (gzip 2052 to 1062 bytes)

and then just a silence. While, usually, I expect something like this:

Cloning into 'opencv'...
POST git-upload-pack (gzip 2040 to 1052 bytes)
remote: Counting objects: 158365, done.
Receiving objects:   8% (12670/158365), 2.32 MiB | 255.00 KiB/s
... and so on ...

How to enable git verbose output in docker build? Maybe I have to start some interactive mode?

Git Solutions


Solution 1 - Git

As far as I undestand it's not the issue of the Docker, but issue of the git. By default git shows progress if you are in an interactive console. If you are not you could specify additional paremeters to git clone to output progress to stdout:

git clone --progress --verbose .....

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAleksei PetrenkoView Question on Stackoverflow
Solution 1 - GitSergey P. aka azureView Answer on Stackoverflow