add Docker support with distroless Nix image

- Add docker package to flake.nix using buildLayeredImage
- Creates 73MB distroless image with Node.js + jellarr bundle
- Add docker-compose.yml example following configarr pattern
- Image uses config/config.yml as default path
- Tested successfully with podman

Users can build locally with: nix build .#docker && docker load < result
Or use published image: ghcr.io/venkyr77/jellarr:latest (coming soon)
This commit is contained in:
Venkatesan Ravi
2025-11-10 04:43:57 -08:00
parent 2f3b2dea0f
commit d5d2f544e0
2 changed files with 31 additions and 3 deletions

10
docker-compose.yml Normal file
View File

@@ -0,0 +1,10 @@
services:
jellarr:
image: ghcr.io/venkyr77/jellarr:latest
container_name: jellarr
environment:
- JELLARR_API_KEY=${JELLARR_API_KEY}
- TZ=Etc/UTC
volumes:
- ./config:/config
restart: "no"

View File

@@ -40,9 +40,27 @@
formatter = (treefmt-nix.lib.evalModule pkgs ./treefmt.nix).config.build.wrapper;
packages.default = import ./nix/package.nix {
inherit pkgs;
inherit (pkgs) lib;
packages = {
default = import ./nix/package.nix {
inherit pkgs;
inherit (pkgs) lib;
};
docker = pkgs.dockerTools.buildLayeredImage {
name = "jellarr";
tag = "latest";
contents = [
pkgs.coreutils
pkgs.nodejs_24
config.packages.default
];
config = {
Cmd = ["${pkgs.lib.getExe config.packages.default}"];
Env = ["NODE_ENV=production"];
};
};
};
};
};