mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
dockerTools: Add cross example
This commit is contained in:
parent
8a3b33baed
commit
5357abf49a
1 changed files with 8 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
|||
# $ nix-build '<nixpkgs>' -A dockerTools.examples.redis
|
||||
# $ docker load < result
|
||||
|
||||
{ pkgs, buildImage, pullImage, shadowSetup, buildImageWithNixDb }:
|
||||
{ pkgs, buildImage, pullImage, shadowSetup, buildImageWithNixDb, pkgsCross }:
|
||||
|
||||
rec {
|
||||
# 1. basic example
|
||||
|
@ -407,4 +407,11 @@ rec {
|
|||
contents = [ pkgs.bash pkgs.coreutils ] ++ nonRootShadowSetup { uid = 999; user = "somebody"; };
|
||||
};
|
||||
|
||||
# basic example, with cross compilation
|
||||
cross-aarch64 = pkgsCross.aarch64-multiplatform.dockerTools.buildImage {
|
||||
name = "hello-cross";
|
||||
tag = "latest";
|
||||
contents = pkgsCross.aarch64-multiplatform.hello;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue