35 lines
796 B
Nix
35 lines
796 B
Nix
{ pkgs ? import <nixpkgs> { }
|
|
|
|
, pkgsLinux ? import <nixpkgs> { system = "x86_64-linux"; }
|
|
|
|
}:
|
|
let
|
|
nixFlakesImage = pkgs.dockerTools.pullImage {
|
|
imageName = "docker.nix-community.org/nixpkgs/nix-flakes";
|
|
imageDigest = "sha256:c564622ed14cccc8c5faa93d2540da29101200f41c442c824da83f54d4915a40";
|
|
sha256 = "15zkpmcrzqplz3fyi5z3gbjag19k627lszdvl93i2rb3ajkbvch6";
|
|
finalImageName = "docker.nix-community.org/nixpkgs/nix-flakes";
|
|
finalImageTag = "latest";
|
|
os = "linux";
|
|
arch = "x86_64";
|
|
};
|
|
in
|
|
|
|
pkgs.dockerTools.buildImage {
|
|
|
|
name = "nix-flakes-node";
|
|
|
|
fromImage = nixFlakesImage;
|
|
fromImageTag = "latest";
|
|
|
|
copyToRoot = pkgs.buildEnv {
|
|
name = "image-root";
|
|
paths = [ pkgsLinux.nodejs_20 ];
|
|
pathsToLink = [ "/bin" ];
|
|
};
|
|
|
|
config = {
|
|
Cmd = [ "/bin/bash" ];
|
|
};
|
|
}
|