libgit2 / libgit2/libgit2sharp

Docker Alpine container exit code 139

Đang mở
#1,807 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
C#
Star
3.5k
Fork
925
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Reproduction steps

I'm running this Dockerfile with a project that uses libgit2sharp.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine as base

EXPOSE 80

VOLUME /etc/nginx
VOLUME /etc/ssl
VOLUME /myproject

ADD tools/ssl/myproject* /etc/ssl/

# Install git.
RUN apk update && apk upgrade && \
    apk add --no-cache git openssh nano

# Build WebSite.
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build

# Install nodejs.
RUN apk update && apk upgrade && \
    apk add --no-cache npm

# Copy everything and publish app
WORKDIR /src
COPY ./src/. .
WORKDIR /src/MyProject/WebSite
RUN dotnet publish -c release -o /app

# Final stage/image
FROM base as final

WORKDIR /app
COPY --from=build /app ./
ENTRYPOINT ["dotnet", "MyProject.WebSite.dll"]

Expected behavior

No crash.

Actual behavior

Docker container exits with code 139. There is nothing being logged from .NET. try/catch is not handling anything. There is no information in docker info. There are no logs in docker itself. I have absolutely no idea why this is crashing.

I'm using this Dockerfile for debugging in Visual Studio.

# This dockerfile is used for debugging in Visual Studio.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine

EXPOSE 80
VOLUME /etc/nginx
VOLUME /etc/ssl
VOLUME /myproject

RUN apk update && \
	apk add --no-cache nodejs npm git openssh

ADD keys/. /root/.ssh/

RUN chmod 600 /root/.ssh/*

Everything works fine here. It's running in the same container OS. The only difference is everything is built inside the container for the image, whereas debugging everything is built then copied in.

I don't know how to figure out what's going wrong at this point.

Version of LibGit2Sharp (release number or SHA1)

0.27.0.-preview-0034

Operating system(s) tested; .NET runtime tested

Docker container mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi với Dockerfile nhiều giai đoạn và Dockerfile dùng để debug bằng Visual Studio được nêu trong issue, đồng thời so sánh các bước build và copy của chúng. Kiểm tra entry point dotnet MyProject.WebSite.dll và hành vi exit-139 của container; được xem là hoàn tất khi xác định được nguyên nhân của native crash và ghi lại một fix hoặc workaround đã được xác nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp, docker
Lĩnh vực
devops
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.