-
Notifications
You must be signed in to change notification settings - Fork 654
[Bug]Segmentation Fault on docker alpine 3.13 #2656
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
Comments
Upon further investigation I found this works if I specifically target the version to "5.0-alpine3.12" of the dotnet docker images. |
I assume it's LibGit2Sharp that is crashing. There's not much we can do in GitVersion but upgrade once libgit2/libgit2sharp#1872 and possibly dotnet/runtime#50739 are resolved. |
If you pull down the .nupkg file, unzip it and I haven't had time to debug this any further though. |
With libgit2/libgit2sharp#1872 and dotnet/runtime#50739 both resolved, I hope #2916 may fix this bug. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. |
Describe the bug
I rely on GitVersion.MSBuild on all my .net core projects. When creating docker images of these project all the versioning was working fine up until I needed to create more compact docker images. When converting my docker files to build an image based on alpine the projected failed to compile with a Segmentation Fault. Initially I thought it was an issue with the build task, but when I was creating a reproducible sample I found that the problem wasn't related to the build task, but gitversion tools also has the problem.
Expected Behavior
running dotnet-gitversion should return version information
Actual Behavior
returns Segmentation Fault
Steps to Reproduce
From within a git repository. Create a Dockerfile
`
ARG VERSION=5.0-alpine
#FROM mcr.microsoft.com/dotnet/aspnet:$VERSION AS base
FROM mcr.microsoft.com/dotnet/runtime-deps:$VERSION AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:$VERSION AS sdkwithgitversion
RUN dotnet tool install -g GitVersion.Tool
ENV PATH="$PATH:/root/.dotnet/tools"
FROM sdkwithgitversion AS build
WORKDIR /src
COPY . .
`
run the docker file and bash into it. Then run dotnet-gitversion to see the error.
Alternatively I have created a reproducable repo here
https://github.com/PedroCigaw/gitversionalpinebug
Context
Our docker images have to be built on alpine from a security and size perspective, this has meant I been forced exclude the GitVersion.MSBuild references when building the docker images, which in turn means no versioning. I'm hoping there is a simple solution in the offing before going to the time and expense of rethinking how I can manage versions consistently between docker builds, CI Builds and nuget packages
The text was updated successfully, but these errors were encountered: