Fib.Net.MSBuild 1.0.0-alpha1

This is a prerelease version of Fib.Net.MSBuild.
dotnet add package Fib.Net.MSBuild --version 1.0.0-alpha1
NuGet\Install-Package Fib.Net.MSBuild -Version 1.0.0-alpha1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fib.Net.MSBuild" Version="1.0.0-alpha1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fib.Net.MSBuild --version 1.0.0-alpha1
#r "nuget: Fib.Net.MSBuild, 1.0.0-alpha1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Fib.Net.MSBuild as a Cake Addin
#addin nuget:?package=Fib.Net.MSBuild&version=1.0.0-alpha1&prerelease

// Install Fib.Net.MSBuild as a Cake Tool
#tool nuget:?package=Fib.Net.MSBuild&version=1.0.0-alpha1&prerelease

Fib.Net

What is Fib?

A full C# rewrite of Google's Jib, Fib.Net builds optimized Docker and OCI images from .NET projects without the need for a Dockerfile or docker daemon.

Usage

To start using Fib.Net to build images for your ASP.NET Core project, install the Fib.Net.MSBuild package.

dotnet install Fib.Net.MSBuild

Then just run a publish targeting the FibDotNet publish provider.

dotnet publish -p:PublishProvider=FibDotNet

This will default to publishing the resulting image to your local docker daemon. The repository name will be the same as your project, and will be tagged with your project version.

Configuration

Fib.Net.MSBuild uses standard MSBuild Properties and Items to control its build. These can be set at the command line, or saved in either your project file, or an MSBuild publish profile.

Properties

General Properties
FibPublishType

The type of publish action being performed. Defaults to Daemon when not explicitly set. Valid values are:

  • Daemon (default): Publishes the image to the local docker daemon using the docker command.
  • Push: Pushes the image to the remote registry.
  • Tar: Build a tar file of your image.
FibOutputTarFile

The path/name of the tar file to be written for publish type Tar. Defaults to $(OutputPath)$(PackageId).tar

FibImageFormat

The format of the image. Can be Docker or OCI. Defaults to Docker.

FibReproducableBuild

When true, sets the time metadata of the image to be Jan 1, 1970. This allows every build to have the same hash.

Base Image Properties
FibBaseImage

The base image the final image is built from. By default it is built from $(FibBaseRegistry), $(FibBaseRepository), $(FibBaseTag) and $(FibBaseDigest).

FibBaseRegistry

The registry of the base image. Defaults to mcr.microsoft.com.

FibBaseRepository

The base image repository. Defaults to dotnet/core/aspnet.

FibBaseTag

The base image tag. Defaults to $(BundledNETCoreAppTargetFrameworkVersion). Overridden by $(FibBaseDigest).

FibBaseDigest

The hash/digest of the base image. Overrides FibBaseImage.

Target Image Properties
FibTargetImage

The name/full tag of the image being built. If not set, built from $(FibTargetRegistry) and $(FibTargetRepository).

FibTargetRegistry

The registry of the image being built. Defaults to '', which means the docker registry.

FibTargetRepository

The repository of the image being built. Defaults to $(PackageId).

FibTargetTag

Semicolon separated list of tags to tag your image with. Gets converted to FibTargetTag items. Defaults to $(PackageVersion).

Image configuration properties
FibEntrypoint

The image entrypoint. Defaults to dotnet.

FibCmd

The image cmd. Defaults to the output assembly in the image.

FibImageWorkingDirectory

The image working directory.

FibImageUser

The image user.

Items

FibImageFile

The list of files to be added to the image. Fib.Net.MSBuild will take all the files in your publish directory and add them to the image in various layers.

FibImageFile items require two metadata properties:

  • Layer: The layer the file is being added to. Fib.Net.MSBuild splits item types into separate layers to improve repeated build speed.
  • TargetPath: The location in the image to put the file.
FibEnvironment

The environment variables to add to the image. They have the format <key>=<value>.

FibPort

The ports the image will expose by default. Format can be any of port number (80), port/protocol (8080/tcp) or port range/protocol (1000-3000/tcp).

FibVolume

The volume mount points of the image.

FibLabel

The metadata labels to apply to the image. They have the format <key>=<value>.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha1 351 3/10/2020