{ pkgs, ... }: let entrypoint = pkgs.writeTextFile { name = "entrypoint"; executable = true; destination = "/bin/entrypoint"; text = builtins.readFile ./entrypoint.sh; }; in pkgs.dockerTools.buildImage { name = "immich"; fromImage = pkgs.docker-image-base; copyToRoot = pkgs.buildEnv { name = "root"; paths = with pkgs; [ entrypoint immich curl jq ]; pathsToLink = [ "/bin" "/lib" ]; }; config = { Entrypoint = [ "entrypoint" ]; Volumes = { "/var/lib/immich" = { }; }; WorkingDir = "/var/lib/immich"; Env = [ "IMMICH_CONFIG_FILE=/etc/immich/config.json" "IMMICH_MEDIA_LOCATION=/var/lib/immich" ]; ExposedPorts = { "2283/tcp" = { }; }; }; }