Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to craft a Dockerfile to work with lib2gitsharp? #1825

Closed
SeanKilleen opened this issue Aug 11, 2020 · 6 comments
Closed

How to craft a Dockerfile to work with lib2gitsharp? #1825

SeanKilleen opened this issue Aug 11, 2020 · 6 comments

Comments

@SeanKilleen
Copy link

SeanKilleen commented Aug 11, 2020

I love the idea of this project and what it enables. Thank you for it!

I'm in the process of attempting to use this library with a .NET core 3.1 web app that I will be hosting in a container.

I am currently using mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim as the base container.

It makes sense to me that I will need to ensure that the container image has the appropriate libgit2 version in place to be able to call it.

My questions are: what is the best way to determine this versioning? Can someone possibly assist me in identifying the appropriate OS variant to use in order to enable this scenario? Is there a known process to modify a Dockerfile to install the appropriate version?

If this information exists anywhere, even if it's scattered, let me know and I will attempt to format it for consumption in the wiki.

Thanks!

@SeanKilleen SeanKilleen changed the title How to craft a container to work with lib2gitsharp? How to craft a Dockerfile to work with lib2gitsharp? Aug 11, 2020
@SeanKilleen
Copy link
Author

I have cross-posted this on SO: https://stackoverflow.com/questions/63361510/how-to-craft-a-dockerfile-to-work-with-lib2gitsharp

Feel free to close this if you feel SO is a more appropriate forum for my question.

@SeanKilleen
Copy link
Author

Closing per the information / solution discovered in: #1725, which I have also updated my SO question to reflect.

@ahickey-sfdc
Copy link

Hello @SeanKilleen. The SO question is gone. Also the solution in #1725 gives a few commands but doesn't link it all together. Do you have a Dockerfile from start to finish that works that you can post here? Thanks!

@csurfleet
Copy link

I'm also really struggling to find a dotnet 5 image that will run this, does anyone have any advice for how to go about it please?

@SeanKilleen
Copy link
Author

@ahickey-sfdc @csurfleet sorry, just getting back to this. Apparently my SO question was hidden for not being focused enough. 🙄

Question I'd posted

Goal

I'm in the process of attempting to use lib2gitsharp with a .NET core 3.1 app that I will be hosting in a container.

I am currently using mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim as the base container.

It makes sense to me that I will need to ensure that the container image has the appropriate libgit2 version in place to be able to call it.

What I've Tried so Far

  • I've attempted to install libgit2 via adding the following to my Dockerfile:
RUN sudo apt-get install -y --no-install-recommends libgit2-dev libcurl3-gnutls

Questions

  • How do I determine which packages to install for a given container to work with libgit2sharp?
  • How do I determine what is a supported libgit2sharp OS?
  • Is there a known process to modify a Dockerfile to install the appropriate version?

What I'd Answered at the time:

In this case, it appears the issue is that by default, .NET Core containers use the :3.1-buster-slim tag (Debian 10).

Debian 10 support in libgit2sharp currently has some issues, and there is an issue open to address this: #1725

I am not constrained on which container OS to use, so I was able to follow the directions in that thread and move to using the :3.1-bionic tag (Ubuntu 18.04) which seems to now work as expected.

@SeanKilleen
Copy link
Author

Per the above, @csurfleet I think if you're able to base it off of an ubuntu distro rather than Debian, it may resolve some of the issues.

Here's the container file I'd gotten working with it (sadly, things stagnated a bit there, but I may pick them up again): https://github.com/excellalabs/konmaripo/blob/main/src/Konmaripo.Web/Dockerfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants