awesome-compose/aspnet-mssql/app/Dockerfile
Anca Iordache f1e4cca535 Move all samples to the root dir
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-03-16 17:23:59 +01:00

19 lines
459 B
Docker
Executable File

FROM mcr.microsoft.com/dotnet/core/sdk:2.1 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 mcr.microsoft.com/dotnet/core/aspnet:2.1 AS runtime
WORKDIR /app
COPY --from=build /app/aspnetapp/out ./
ENTRYPOINT ["dotnet", "aspnetapp.dll"]