Permalink
Switch branches/tags
Nothing to show
Find file Copy path
20 lines (15 sloc) 521 Bytes
# This Dockerfile uses nightly preview builds for .NET Core
FROM microsoft/dotnet-nightly:2.2-sdk AS build
WORKDIR /app
# copy csproj and restore as distinct layers
COPY *.sln .
COPY aspnetapp/*.csproj ./aspnetapp/
RUN dotnet restore
# copy everything else and build app
COPY aspnetapp/. ./aspnetapp/
WORKDIR /app/aspnetapp
RUN dotnet publish -c Release -o out
FROM microsoft/dotnet-nightly:2.2-aspnetcore-runtime AS runtime
WORKDIR /app
COPY --from=build /app/aspnetapp/out ./
ENTRYPOINT ["dotnet", "aspnetapp.dll"]