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:
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal 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"
|
||||
24
flake.nix
24
flake.nix
@@ -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"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user