Skip to content

n2c-mod

Build slim docker containers reproducibly with nix using the huge nixpkgs package collection.

Implementation Status

Only very few options of nix2container are currently supported.

Example

{
# Provide builders for all systems of your flake
perSystem = {
# `imageSystem`, `imagePkgs` automatically refer to the target architecture
# of your image.
# By default, the corresponding Linux platform for Darwin/Mac OS.
n2c.images.basic = {imageSystem, imagePkgs, ...}: {
imageConfig = {
# As usual with nix, all dependencies are included automatically.
# But you can also explicitly decide what to put into which layer!
entrypoint = ["${imagePkgs.hello}/bin/hello"];
};
};
};
}

Built on top of

flake-parts

n2c-mod is built as a flake module using flake.parts.