summary refs log tree commit diff
path: root/pkgs/build-support/docker/examples.nix
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2021-03-11 14:58:26 -0500
committerGitHub <noreply@github.com>2021-03-11 14:58:26 -0500
commit17a9f368e3519041a360285ce7a845ee36623b7d (patch)
treeb73976f9a1d3672051da26eb789e472122a94af5 /pkgs/build-support/docker/examples.nix
parentf707104092b2dc70b364297826fffeed4c3968cc (diff)
parent419a4fa596577667271fcfc057bc9063ddbffe47 (diff)
downloadnixpkgs-17a9f368e3519041a360285ce7a845ee36623b7d.tar
nixpkgs-17a9f368e3519041a360285ce7a845ee36623b7d.tar.gz
nixpkgs-17a9f368e3519041a360285ce7a845ee36623b7d.tar.bz2
nixpkgs-17a9f368e3519041a360285ce7a845ee36623b7d.tar.lz
nixpkgs-17a9f368e3519041a360285ce7a845ee36623b7d.tar.xz
nixpkgs-17a9f368e3519041a360285ce7a845ee36623b7d.tar.zst
nixpkgs-17a9f368e3519041a360285ce7a845ee36623b7d.zip
Merge pull request #115793 from lbpdt/feature/docker-tools-layered-image-name-slashes
dockerTools.buildLayeredImage: image names with registry/ prefix
Diffstat (limited to 'pkgs/build-support/docker/examples.nix')
-rw-r--r--pkgs/build-support/docker/examples.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix
index 86375a40baa..9e33a42af23 100644
--- a/pkgs/build-support/docker/examples.nix
+++ b/pkgs/build-support/docker/examples.nix
@@ -427,4 +427,18 @@ rec {
       tag = "latest";
       contents = [ pkgs.bash symlink ];
     } // { passthru = { inherit symlink; }; };
+
+  # image with registry/ prefix
+  prefixedImage = pkgs.dockerTools.buildImage {
+    name = "registry-1.docker.io/image";
+    tag = "latest";
+    config.Cmd = [ "${pkgs.hello}/bin/hello" ];
+  };
+
+  # layered image with registry/ prefix
+  prefixedLayeredImage = pkgs.dockerTools.buildLayeredImage {
+    name = "registry-1.docker.io/layered-image";
+    tag = "latest";
+    config.Cmd = [ "${pkgs.hello}/bin/hello" ];
+  };
 }