Upgrade to Pro — share decks privately, control downloads, hide ads and more …

.NET Conf.local Switzerland 2018: Docker for AS...

.NET Conf.local Switzerland 2018: Docker for ASP.NET (Core) Developers by Marc Müller

Docker is an ideal artifact format for the delivery of applications. The standardized interfaces reduce complexity on the side of operations, but new tasks are now being added on the development side. What this means in detail is explained in this presentation, as well as the technical basics and best practices for docker based development.

Azure Zurich User Group

October 23, 2018
Tweet

More Decks by Azure Zurich User Group

Other Decks in Technology

Transcript

  1. Orders Products DAL Order Data Product Data BL Order Logic

    Product Search Product Logic UI Admin UI
  2. API Gateway / Proxy Order Service Orders Order Data Order

    Logic Customer UI Admin UI Product Search Service Products Product Data Product Search Product Service Products Product Data Product Search Message Queue
  3. ▪ Versioned artifact ▪ Isolated deployable unit ▪ Container image

    is bit by bit identical when deployed ▪ Abstraction of data center resources ▪ ▪ Orchestration is “Cattle Business” ▪ ▪
  4. Server Host OS Hypervisor Server Host OS Docker Engine Guest

    OS Guest OS Guest OS Bins/Libs Bins/Libs App A App A’ App B Bins/Libs Bins/Libs App A App A’ App B App B’ App B App B’ App B App B’ Containers are isolated, but share OS and, where appropriate, bins/libraries Bins/Libs Image Source: https://sec.ch9.ms/sessions/build/2016/B822.pptx
  5. Linux Windows Process Linux Container Virtual Machines Process Windows Server

    Container Hyper-V VMs Hyper-V Container Quotas, Limits Added Isolation Kernel Kernel Faster, more efficient More isolated, more secure Source: Mark Fussel (Microsoft), Azure Service Fabric - Build always-on, hyper-scalable, microservice-based cloud applications
  6. FROM microsoft/dotnet:2.1-aspnetcore- runtime WORKDIR /app COPY output/app . ENTRYPOINT ["dotnet",

    "HelloWorld.dll"] FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base WORKDIR /app EXPOSE 80 FROM microsoft/dotnet:2.1-sdk AS build WORKDIR /src COPY ["HelloWorld/HelloWorld.csproj", "HelloWorld/"] RUN dotnet restore "HelloWorld/HelloWorld.csproj" COPY . . WORKDIR "/src/HelloWorld" RUN dotnet build "HelloWorld.csproj" -c Release -o /app FROM build AS publish RUN dotnet publish "HelloWorld.csproj" -c Release -o /app FROM base AS final WORKDIR /app COPY --from=publish /app . ENTRYPOINT ["dotnet", "HelloWorld.dll"]
  7. Build Pipeline Release Pipeline Docker Registry Build App Test Build

    Container Repo Container Info Deplyoment Config Publish to Target Host / Cluster Container Info Deplyoment Config Push Host / Cluster Pull Config Artifact
  8. Azure DevOps Azure Resource Group DCOS Master DCOS Master Master

    Agent Agent App1 App1 App1 App1 App1 App2 Git Build Release Internet Azure Load Balancer Ingress LeGo