felixfbecker / PowerGit

Git with the power of the PowerShell object pipeline. For macOS, Linux and Windows.
Apache License 2.0
30 stars 6 forks source link

Not work inside Alpine docker container #22

Open maximpashuk opened 4 years ago

maximpashuk commented 4 years ago

Way to reproduce:

  1. Download latest .net core sdk docker image
    docker pull mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
  2. Run container interactive
    docker run --rm -it mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
  3. Run pwsh and install PowerGit
    Install-Module PowerGit
  4. After that calling to Get-GitRepository command throws an exception related to native binaries libgit2
    Get-GitRepository : {Write-Error: Exception calling ".ctor" with "1" argument(s): "The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.", Exception calling ".ctor" with "1" argument(s): "The 
    type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception."
    At /root/.local/share/powershell/Modules/PowerGit/0.6.1/Functions/Find-GitRepository.ps1:73 char:8

Probably this is not actually your fail, I think this is because lack of support of alpine linux distro in libgit2. I am not sure what docker image distros are supported. Good to update docs which versions are supported and which is not supported. Or, probably I am missing something.

felixfbecker commented 4 years ago

Yeah this would need to be filed on https://github.com/libgit2/libgit2sharp.nativebinaries :/