libgit2 / libgit2/libgit2sharp

Docker Alpine container exit code 139

Aperta
#1,807 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
3.5k
Fork
925
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il malfunzionamento con il Dockerfile multi-stage e il Dockerfile di debug di Visual Studio mostrati nell’issue, confrontando i relativi passaggi di build e copia. Ispeziona il punto di ingresso dotnet MyProject.WebSite.dll e il comportamento exit-139 del container; il lavoro è completato quando viene identificata la causa del crash nativo e viene documentato un fix o workaround confermato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, docker
Ambito
devops
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.