dockerTools.streamLayeredImage
state: | released |
maintainers: | @YorickvP |
Introduction¶
Options¶
deps¶
All dependencies of the package. This option should be set by the "outer world" and can be used to inherit attributes from pkgs
or inputs
etc.
By separating the task of retrieving things from the outside world, it is ensured that the dependencies are overridable.
Nothing will stop users from adding nixpkgs
itself as a dependency, but this will make it very hard for the user of the package to override any dependencies, because they'd have to figure out a way to insert their changes into the Nixpkgs fixpoint. By adding specific attributes to deps
instead, the user has a realistic chance of overriding those dependencies.
So deps should be specific, but not overly specific. For instance, the caller shouldn't have to know the version of a dependency in order to override it. The name should suffice. (e.g. nix = nixVersions.nix_2_12
instead of inherit (nixVersions) nix_2_12
.
type | lazy attribute set of raw value |
source | dream2nix/modules/dream2nix/core/deps |
default | { }
|
example |
{nixpkgs, ...}: {
inherit (nixpkgs) stdenv;
inherit (nixpkgs.haskellPackages) pandoc;
}
|
public¶
The final result of the evaluated package.
Contains everything that nix expects from a derivation.
Contains fields like name, outputs, drvPath, outPath, etc.
Can be build with nix-build or nix build
.
type | lazy attribute set of anything |
source | dream2nix/modules/dream2nix/core/public/interface.nix |
dockerTools¶
streamLayeredImage¶
dockerTools.streamLayeredImage.architecture¶
Image architecture, defaults to the architecture of the hostPlatform
when unset
type | string |
source | cognix/modules/stream-layered-image |
default | "amd64"
|
dockerTools.streamLayeredImage.config¶
Docker config; e.g. what command to run on the container.
type | attribute set of anything |
source | cognix/modules/stream-layered-image |
default | { }
|
dockerTools.streamLayeredImage.contents¶
Files to put on the image (a nix store path or list of paths).
type | list of package |
source | cognix/modules/stream-layered-image |
default | [ ]
|
dockerTools.streamLayeredImage.created¶
Time of creation of the image. Passing "now" will make the created date be the time of building.
type | string |
source | cognix/modules/stream-layered-image |
default | "1970-01-01T00:00:01Z"
|
dockerTools.streamLayeredImage.enableFakechroot¶
Whether to run fakeRootCommands in fakechroot as well, so that they appear to run inside the image, but have access to the normal Nix store. Perhaps this could be enabled on by default on pkgs.stdenv.buildPlatform.isLinux
type | boolean |
source | cognix/modules/stream-layered-image |
default | false
|
dockerTools.streamLayeredImage.extraCommands¶
Optional bash script to run on the files prior to fixturizing the layer.
type | strings concatenated with "\n" |
source | cognix/modules/stream-layered-image |
default | ""
|
dockerTools.streamLayeredImage.extraJSONFile¶
JSON file that's merged into the stream configuration. Use this to add things only available at build time, such as other build results.
type | path |
source | cognix/modules/stream-layered-image |
default | "/nix/store/6llq5mliaf03nj25ib0lm841cgjw5mbg-empty.json"
|
dockerTools.streamLayeredImage.fakeRootCommands¶
Optional bash script to run inside fakeroot environment. Could be used for changing ownership of files in customisation layer.
type | strings concatenated with "\n" |
source | cognix/modules/stream-layered-image |
default | ""
|
dockerTools.streamLayeredImage.fromImage¶
Parent image, to append to.
type | null or string |
source | cognix/modules/stream-layered-image |
default | null
|
dockerTools.streamLayeredImage.includeNixDB¶
Whether to generate a Nix DB. The DB won't be merged between multiple stages.
type | boolean |
source | cognix/modules/stream-layered-image |
default | false
|
dockerTools.streamLayeredImage.includeStorePaths¶
Whether to include store paths in the image. You generally want to leave this on, but tooling may disable this to insert the store paths more efficiently via other means, such as bind mounting the host store.
type | boolean |
source | cognix/modules/stream-layered-image |
default | true
|
dockerTools.streamLayeredImage.maxLayers¶
We pick 100 to ensure there is plenty of room for extension. I believe the actual maximum is 128.
type | signed integer |
source | cognix/modules/stream-layered-image |
default | 100
|
dockerTools.streamLayeredImage.passthru¶
Passthru arguments for the underlying derivation.
type | attribute set of anything |
source | cognix/modules/stream-layered-image |
default | { }
|
dockerTools.streamLayeredImage.streamScript¶
Path to streaming script
type | path |
source | cognix/modules/stream-layered-image |
default | <derivation stream>
|
dockerTools.streamLayeredImage.tag¶
Image tag, the Nix's output hash will be used if null
type | null or string |
source | cognix/modules/stream-layered-image |
default | null
|