konet 0.0.5

dotnet tool install --global konet --version 0.0.5                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local konet --version 0.0.5                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=konet&version=0.0.5                
nuke :add-package konet --version 0.0.5                

konet: Easy .NET Containers

Nuget Build

Alt text

konet is an easy to use and fast container image builder for .NET applications.

It creates binaries for different platforms and architectures by running dotnet build and pushes only those binaries as new layers to a container image registry with a reference to a .NET base image.

konet is fast as it builds binaries locally and doesn't require docker to be installed or base images to be pulled. It's easy to use, doesn't require writing a Dockerfile and produces minimal images.

konet is heavily inspired by ko.

Setup

Installation

konet is distributed as a .NET tool. With .NET set up you can easily install and update it:

dotnet tool install --global konet

Update

dotnet tool update --global konet

Authenticate

konet can use existing authentication data, e.g. from ~/.docker/config.json. As konet doesn't require docker, you can also login to a container image registry via konet login.

Build an Image

konet build automatically compiles the current .NET project for all available architectures and pushes images including the binaries - all without downloading any base image and without a container runtime.

Example:

dotnet new console -n myconsoleapp
cd myconsoleapp/
konet build -t lippertmarkus/test-console:1.0
# ...
# Successfully pushed to lippertmarkus/test-console:1.0

The result is a manifest list at the tag specified in -t, referencing images for different architectures with the compiled binary as the entrypoint.

Configuration

Target Platforms

Per default konet creates images for all platforms .NET supports and for which there is an official base image available. Those include linux/amd64,linux/arm/v7,linux/arm64/v8,windows/amd64:1809,windows/amd64:1903,windows/amd64:1909,windows/amd64:2004,windows/amd64:20H2,windows/amd64:ltsc2022.

You can limit the platforms by adding -p windows/amd64:ltsc2022,linux/amd64 to konet build.

Acknowledgements

This work is heavily inspired by ko and uses crane under the hood.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.0.5 2,112 5/19/2022
0.0.4 504 5/19/2022
0.0.3 490 5/19/2022
0.0.2 468 5/19/2022

Initial release