Guest User

Untitled

a guest
Apr 25th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4. municipaleportal:
  5. image: myapp
  6. ports:
  7. - "5000:80"
  8. build:
  9. context: .
  10. dockerfile: MyAppDockerfile
  11. container_name: "myapp"
  12. hostname: "myapp"
  13. depends_on:
  14. - db
  15. db:
  16. image: "microsoft/mssql-server-windows-express"
  17. environment:
  18. SA_PASSWORD: ""
  19. ACCEPT_EULA: "Y"
  20. container_name: "myapp"
  21. hostname: "myapp"
  22.  
  23. FROM microsoft/aspnetcore:2.0-nanoserver-1709 AS base
  24. WORKDIR /app
  25. EXPOSE 80
  26.  
  27. FROM microsoft/aspnetcore-build:2.0-nanoserver-1709 AS build
  28. WORKDIR /src
  29. COPY MyApp.sln ./
  30. COPY MyApp/MyApp.csproj MyApp/
  31. RUN dotnet restore -nowarn:msb3202,nu1503
  32. COPY . .
  33. WORKDIR /src/MyApp
  34. RUN dotnet restore
  35. RUN dotnet ef database update
  36. RUN dotnet build -c Release -o /app
  37.  
  38. FROM build AS publish
  39. RUN dotnet publish -c Release -o /app
  40.  
  41. FROM base AS final
  42. WORKDIR /app
  43. COPY --from=publish /app .
  44. ENTRYPOINT ["dotnet", "MyApp.dll"]
Add Comment
Please, Sign In to add comment