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

Users who have contributed to this file

29 lines (22 sloc) 673 Bytes
FROM microsoft/dotnet:2.1-sdk 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 AS runtime
COPY --from=build /app/dotnetapp/out ./
ENTRYPOINT ["dotnet", "dotnetapp.dll"]