Closed nervo closed 5 years ago
Hello @nervo
Thank you for the patch, but tried to build the Dockerfile locally and got errors. Could you please try locally?
Hm, sorry, i did not realize that git2go master is currently broken.. Anyway, branch v27 (2.7) is the right way, as it's the current version of libgit2 in alpine. And yes, i was a little bit fast, and forgot few dependencies :)
Could you give it another try ?
Ach', and now, i realize that libgit2 is absolutely not statically linked...
Error loading shared library libgit2.so.27: No such file or directory (needed by /bin/gitsplit)
Wtf...
Thank you for the update. I finally make it work with in the second "stage"
- FROM alpine
+ FROM alpine:3.8
RUN apk add --no-cache \
git \
openssh-client \
+ libgit2 \
ca-certificates
could you please have a try?
I think i've figured it out :) In my last commit:
libgit2-dev
is not used anymore, can switch back to openssl instead of libressl (long story short, libgit2-dev need libcurl, which need libressl, which conflicts with openssl)openssl-dev
was used during build time, of course openssl
is needed for running timeThat said, of course, if you just add libgit2 for running time like your proposal on https://github.com/jderusse/docker-gitsplit/pull/20#issuecomment-437175859, that will work, but you loose all the interests of having libgit2 statically linked to your bin.
And because i'm not so sure of myself, i've also filled a clarification issue on git2go: https://github.com/libgit2/git2go/issues/464
Ah, one last thing. Because i was so tired of git2go/libgit2/go "hacking", i have give a try to https://github.com/src-d/go-git Well, for the moment, that just works... You can tell a word on it to fabpot and its splitsh :)
thank you @nervo for this great contribution!!
This repository uses libgit2 to share the same dependency with splitsh. And splitsh uses it for performance reason. I doubt that a go implementation would be faster that libgit2, but if you have a benchmark, it would be great to give a try
Git2go "next" branch is deprecated, and static linking is recommended for "master" branch. See: https://github.com/libgit2/git2go#master-branch-or-static-linking
Some references: