Git clone verbose output?

人盡茶涼 提交于 2020-02-19 07:19:27

问题


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?


回答1:


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 .....


来源:https://stackoverflow.com/questions/26056130/git-clone-verbose-output

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!