- Build a self-contained .NET Core app.
- Not install the .NET Core SDK on the CI server
- Fit this into a build pipeline that was already containerized.
- First build a container using docker build
- The run the container with a local folder called "output" as a volume
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.
No comments:
Post a Comment