Guest User

Untitled

a guest
Dec 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. FROM microsoft/dotnet:2.2-sdk AS builder
  2. WORKDIR /sln
  3.  
  4. COPY ./*.sln ./NuGet.config ./
  5.  
  6. COPY src/*/*.csproj ./
  7. RUN for file in $(ls *.csproj); do mkdir -p src/${file%.*}/ && mv $file src/${file%.*}/; done
  8.  
  9. COPY test/*/*.csproj ./
  10. RUN for file in $(ls *.csproj); do mkdir -p test/${file%.*}/ && mv $file test/${file%.*}/; done
  11.  
  12. RUN dotnet restore
  13.  
  14. COPY ./src ./src
  15. COPY ./test ./test
  16. RUN dotnet build -c Release --no-restore
  17.  
  18. RUN dotnet test ./test/TodoList.Web.Tests/TodoList.Web.Tests.csproj -c Release --no-build --no-restore
  19.  
  20. RUN dotnet publish ./src/TodoList.Web/TodoList.Web.csproj -c Release -o ../../dist --no-restore
  21.  
  22. FROM microsoft/dotnet:2.2-aspnetcore-runtime
  23. WORKDIR /app
  24. COPY --from=builder /sln/dist .
  25. ENTRYPOINT ["dotnet", "TodoList.Web.dll"]
Add Comment
Please, Sign In to add comment