From 4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7 Mon Sep 17 00:00:00 2001 From: Ian Kerins Date: Tue, 8 Mar 2022 03:11:47 -0500 Subject: [PATCH] nixos/oci-containers: improve description of imageFile As a novice to using this module, I found the existing description to be quite misleading. It does not at all disable pulling from the registry, it just loads some image archive that may or may not be related to the container you're specifying. I had thought there was extra magic behind this option, but it's just a `docker load`. You need foreknowledge of the contents of the archive so that whatever it contained is actually used to run the container. I've reworded the description to hopefully make this behavior clearer. --- nixos/modules/virtualisation/oci-containers.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/modules/virtualisation/oci-containers.nix b/nixos/modules/virtualisation/oci-containers.nix index 5af9baff8bc..f4048172783 100644 --- a/nixos/modules/virtualisation/oci-containers.nix +++ b/nixos/modules/virtualisation/oci-containers.nix @@ -22,11 +22,13 @@ let type = with types; nullOr package; default = null; description = '' - Path to an image file to load instead of pulling from a registry. - If defined, do not pull from registry. + Path to an image file to load before running the image. This can + be used to bypass pulling the image from the registry. - You still need to set the image attribute, as it - will be used as the image name for docker to start a container. + The image attribute must match the name and + tag of the image contained in this file, as they will be used to + run the container with that image. If they do not match, the + image will be pulled from the registry as usual. ''; example = literalExpression "pkgs.dockerTools.buildImage {...};"; };