Showing posts with label ASP.NET Core. Show all posts
Showing posts with label ASP.NET Core. Show all posts

Saturday, February 16, 2019

Building a self-contained .NET Core app in a container

Last week I needed to
  1. Build a self-contained .NET Core app.
  2. Not install the .NET Core SDK on the CI server
  3. Fit this into a build pipeline that was already containerized.
These three requirements led me to build the self-contained app in a container. Doing that is a 2 step process:
  1. First build a container using docker build
  2. The run the container with a local folder called "output" as a volume
The result is that the self-contained app is in the local "output" folder.
This is a Dockerfile that allows this:


And the two commands needed to build and run the container are:


That builds the self-contained app into .\output\release\netcoreapp2.2\linux-x64\publish\

For context: In my case I needed to build DbUp as part of the build pipeline for a service that I run in a container. I want DbUp to be self-contained so I can run it during the deployment pipeline without needing to install the .NET Core runtime.

Tuesday, March 28, 2017

Talk video: "Consolidating Services with middleware" from NDC London 2017

Back in January I did a talk called at NDC London called "Consolidating Services with middleware", and the video of the talk has come out. Enjoy!



Consolidating Services with middleware - Christian Horsdal from NDC Conferences on Vimeo.

In case you are wondering what the talk is about, here is the abstract:
"Have many services? Writing new ones often? If so middleware can help you cut down on the ceremony for writting new services and at same time consolidate the handling of cross cutting concerns. But what is middleware? OWIN and ASP.NET Core both have a concept of middleware. What are they? How do they help? In this talk we will dive into the code, write some middleware and show how middleware helps you handle cross-cutting concerns in an isolated and re-usable way across your services. I'll compare and contrast the OWIN and ASP.NET Core middleware concepts and talk about where each is appropriate."