wip
All checks were successful
Build and push nixos-based docker container / build (push) Successful in 21s
All checks were successful
Build and push nixos-based docker container / build (push) Successful in 21s
This commit is contained in:
parent
27588a1d35
commit
9d73fbdce7
24
docker.nix
24
docker.nix
|
@ -2,19 +2,35 @@
|
|||
|
||||
let
|
||||
name = "node-red";
|
||||
packages =
|
||||
with pkgs;
|
||||
with nodePackages;
|
||||
[
|
||||
bash
|
||||
coreutils
|
||||
nodejs
|
||||
npm
|
||||
node-red
|
||||
#ungoogled-chromium
|
||||
];
|
||||
entrypoint = pkgs.writeShellApplication {
|
||||
name = "entrypoint";
|
||||
|
||||
runtimeInputs = with pkgs; with nodePackages; [
|
||||
node-red
|
||||
#ungoogled-chromium
|
||||
];
|
||||
runtimeInputs = packages;
|
||||
|
||||
text = ''
|
||||
npm i passport-openidconnect
|
||||
node-red -u "''${DATA-/data}" -s "''${SETTINGS-/data/settings.js}"
|
||||
'';
|
||||
};
|
||||
in pkgs.dockerTools.streamLayeredImage {
|
||||
inherit name;
|
||||
contents = packages;
|
||||
config.Cmd = [ "${entrypoint}/bin/entrypoint" ];
|
||||
config.Workdir = "/tmp";
|
||||
config.Env = [ "HOME=/data" ];
|
||||
fakeRootCommands = ''
|
||||
mkdir -p /tmp
|
||||
chmod 1777 /tmp
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user