Posted on

Asp.Net-core Docker container not running on raspberry pi – Stack Overflow

FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app

# copy csproj and restore as distinct layers
COPY /src ./
RUN dotnet restore

# copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out -r linux-arm

# build runtime image
FROM microsoft/dotnet:2.0.0-runtime-stretch-arm32v7
WORKDIR /app
COPY --from=build-env /app/src/RadiusNet.Web/out .
ENTRYPOINT ["dotnet", "yourapp.dll"]

Source: Asp.Net-core Docker container not running on raspberry pi – Stack Overflow