change to writeShellApplication #1

Merged
james merged 1 commits from development into main 2024-08-04 04:20:17 +00:00
2 changed files with 17 additions and 7 deletions

View File

@ -1,6 +1,20 @@
{ config, pkgs, ...}:
pkgs.dockerTools.streamLayeredImage {
name = "node-red";
config.Cmd = [ "${pkgs.nodePackages.node-red}/bin/node-red" ];
let
name = "node-red";
entrypoint = pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; with nodePackages; [
node-red
ungoogled-chromium
];
text = ''
node-red
'';
};
in pkgs.dockerTools.streamLayeredImage {
inherit name;
config.Cmd = [ "${entrypoint}/bin/entrypoint" ];
}

View File

@ -11,10 +11,6 @@
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
streamImage = pkgs.callPackage (import ./docker.nix) {};
#pkgs.dockerTools.streamLayeredImage {
# name = "node-red";
# config.Cmd = [ "${pkgs.nodePackages.node-red}/bin/node-red" ];
#};
in
{