diff options
author | Christian Kemper <christian.kemper@me.com> | 2022-11-21 12:10:07 +0000 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-12-08 20:29:09 +0100 |
commit | f6ae4479ea712a7f478a4e0dce92bd06b6f75370 (patch) | |
tree | d4d1f0772797e9126daf51aea47c5d39d55fd040 /pkgs/build-support/docker/examples.nix | |
parent | f21f11aa2a02cb78651c6d57546c7d7541f9240c (diff) | |
download | nixpkgs-f6ae4479ea712a7f478a4e0dce92bd06b6f75370.tar nixpkgs-f6ae4479ea712a7f478a4e0dce92bd06b6f75370.tar.gz nixpkgs-f6ae4479ea712a7f478a4e0dce92bd06b6f75370.tar.bz2 nixpkgs-f6ae4479ea712a7f478a4e0dce92bd06b6f75370.tar.lz nixpkgs-f6ae4479ea712a7f478a4e0dce92bd06b6f75370.tar.xz nixpkgs-f6ae4479ea712a7f478a4e0dce92bd06b6f75370.tar.zst nixpkgs-f6ae4479ea712a7f478a4e0dce92bd06b6f75370.zip |
dockerTools: allowing architecture to be specified
... for buildImage, buildLayeredImage and streamLayeredImage, adding docs and tests.
Diffstat (limited to 'pkgs/build-support/docker/examples.nix')
-rw-r--r-- | pkgs/build-support/docker/examples.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix index 71c3574963c..80661c1a7d9 100644 --- a/pkgs/build-support/docker/examples.nix +++ b/pkgs/build-support/docker/examples.nix @@ -700,6 +700,21 @@ rec { contents = [ pkgs.bashInteractive ./test-dummy ]; }; + build-image-with-architecture = buildImage { + name = "build-image-with-architecture"; + tag = "latest"; + architecture = "arm64"; + # Not recommended. Use `buildEnv` between copy and packages to avoid file duplication. + copyToRoot = [ pkgs.bashInteractive ./test-dummy ]; + }; + + layered-image-with-architecture = pkgs.dockerTools.streamLayeredImage { + name = "layered-image-with-architecture"; + tag = "latest"; + architecture = "arm64"; + contents = [ pkgs.bashInteractive ./test-dummy ]; + }; + # ensure that caCertificates builds image-with-certs = buildImage { name = "image-with-certs"; |