Switch branches/tags
Nothing to show
Find file Copy path
8c992e2 Jun 14, 2018
2 contributors

Users who have contributed to this file

@richlander @MichaelSimons
29 lines (22 sloc) 687 Bytes
FROM microsoft/dotnet:2.1-sdk-alpine AS build
# copy csproj and restore as distinct layers
COPY dotnetapp/*.csproj ./dotnetapp/
COPY utils/*.csproj ./utils/
WORKDIR /app/dotnetapp
RUN dotnet restore
# copy and publish app and libraries
COPY dotnetapp/. ./dotnetapp/
COPY utils/. ./utils/
WORKDIR /app/dotnetapp
RUN dotnet publish -c Release -o out
# test application -- see:
FROM build AS testrunner
WORKDIR /app/tests
COPY tests/. .
ENTRYPOINT ["dotnet", "test", "--logger:trx"]
FROM microsoft/dotnet:2.1-runtime-alpine AS runtime
COPY --from=build /app/dotnetapp/out ./
ENTRYPOINT ["dotnet", "dotnetapp.dll"]