diff --git a/docker.nix b/docker.nix index 74b699d..c6baf2e 100644 --- a/docker.nix +++ b/docker.nix @@ -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" ]; } diff --git a/flake.nix b/flake.nix index 40a9e5f..1c766b7 100644 --- a/flake.nix +++ b/flake.nix @@ -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 {