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

Using Docker to supercharge .NET development on...

Using Docker to supercharge .NET development on Linux

My presentation from DDD Sydney 2017, held at UTS Sydney in July. Note that this talk is slightly different from the one at Fringe as it is longer, more detailed and a little heavier on the demos.

Avatar for Alistair Chapman

Alistair Chapman

July 15, 2017

More Decks by Alistair Chapman

Other Decks in Technology

Transcript

  1. DOCKER Process and environment isolation Supported on Linux, Windows (mostly)

    and macOS (sort of) Currently undergoing a minor identity crisis .NET CORE The next generation of the .NET platform Supported on Windows, macOS (mostly) and Linux (sort of) Currently undergoing a minor identity crisis 6
  2. ADDING DOCKER TO THE MIX Use a Dockerfile to build

    an image You can then run your image to run your app in a container Your base image decides the environment FROM microsoft/dotnet:1.1.2-sdk COPY . /app WORKDIR /app RUN ["dotnet", "restore"] RUN ["dotnet", "build"] EXPOSE 5000/tcp CMD ["dotnet", "run", "--server.urls", "http://*:5000"] 8
  3. BUILDING WITH DOCKER Docker containers provide: Isolation "Clean" environment Deterministic

    builds Containers won't provide: "Real-world" usage Security for untrusted code* Compatibility guarantees 11
  4. WHERE TO NEXT? Try it out for yourself Check out

    Windows Containers Develop further with schedulers Host on your platform of choice 16