summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorIan Kerins <ianskerins@gmail.com>2022-03-08 03:11:47 -0500
committerBjørn Forsman <bjorn.forsman@gmail.com>2022-03-12 11:14:22 +0100
commit4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7 (patch)
treeddfa209a8eed0ce31a6f3e1ddb4c7b1968958dbe /nixos
parentc91456e4d3222faafb53972b8fd52c9f0cc78661 (diff)
downloadnixpkgs-4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7.tar
nixpkgs-4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7.tar.gz
nixpkgs-4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7.tar.bz2
nixpkgs-4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7.tar.lz
nixpkgs-4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7.tar.xz
nixpkgs-4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7.tar.zst
nixpkgs-4c6772e2a1152f5c4cede5aeca89d1e3bab8c8a7.zip
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.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/oci-containers.nix10
1 files 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 <literal>image</literal> attribute, as it
-            will be used as the image name for docker to start a container.
+            The <literal>image</literal> 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 {...};";
         };