40 lines
687 B
Nix
40 lines
687 B
Nix
{ pkgs, ... }:
|
|
let
|
|
entrypoint = pkgs.writeTextFile {
|
|
name = "entrypoint";
|
|
executable = true;
|
|
destination = "/bin/entrypoint";
|
|
text = builtins.readFile ./entrypoint.sh;
|
|
};
|
|
in
|
|
pkgs.dockerTools.buildImage {
|
|
name = "sonarr";
|
|
fromImage = pkgs.docker-image-base;
|
|
|
|
copyToRoot = pkgs.buildEnv {
|
|
name = "root";
|
|
paths = with pkgs; [
|
|
entrypoint
|
|
sonarr
|
|
xmlstarlet
|
|
curl
|
|
jq
|
|
];
|
|
pathsToLink = [
|
|
"/bin"
|
|
"/lib"
|
|
];
|
|
};
|
|
|
|
config = {
|
|
Entrypoint = [ "entrypoint" ];
|
|
ExposedPorts = {
|
|
"8989/tcp" = { };
|
|
};
|
|
WorkingDir = "/var/lib/sonarr";
|
|
Volumes = {
|
|
"/var/lib/sonarr" = { };
|
|
};
|
|
};
|
|
}
|