mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
dockerTools: Add cross example
This commit is contained in:
parent
8a3b33baed
commit
5357abf49a
@ -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 New Issue
Block a user