Closed petdance closed 3 years ago
Interesting :thinking:, what platform are you on? It looks like an issue with the git or docker installation. This used to work. Not sure it's a problem with docker-show-context.
It works here, git version 2.25.1, docker 19.03.8.
$ docker --version
Docker version 20.10.3, build 48d30b5
$ git --version
git version 1.8.3.1
@petdance that version of git looks quite old, dating from 2013. I suspect that's why you're seeing this. I suggest getting a more recent version. I don't think there is anything we can change on our side. Essentially this error is coming when docker runs git clone
. If you wanted this "fixed" it would have to be fixed in docker or git, but no-one is going to make changes to support such an old git version, I think.
Unfortunately there isn't enough information to figure out what minimum git version you need. I believe it worked with Ubuntu Trusty though, circa 2014, which had git version 1.9.1.
I don't think there is anything more to action here but if you want to report back any more information (e.g. what OS you're on, if you get it working) please do on this ticket. And do report if you have other issues that prevent you from getting this working. All the best!
Understood. You have to draw a line at what you can support.
I've been looking into why my git is so old, and it looks like I've got the most recent one in yum's Centos repo. I wonder why it's so far behind. :-(
Can you tell me what the git clone
is that it's trying to execute? I might be able to find the minimum version you need based on that. I would bet that I won't be the only who will have this problem.
Yeah, it looks like EPEL just has old versions of Git, don't know why.
With the new Git, all is well. Thanks for this, it will be a big help in slimming down my images.
At a guess, looks like it is submodule update --depth
[0], which seems to be supported since git 1.8.4 [1].
[0] https://github.com/moby/moby/blob/d5209b29b9777e0b9713d87847a5dc8ce9d93da6/builder/remotecontext/git/gitutils.go#L67 [1] git/git@2bb7aface663f4d9f01d08282ee38cf8f636df0d
Ha! It figures I was just a point release behind. :-)
The README.md says that I should
This gives me:
I've tried this in my home directory, a temp directory in my home directory, and
/tmp
, just in case there were problems with existing files or permissions in the way. Same results in all three.