Install ranger and mount its database
Agent shares the host ranger DB so tasks are visible inside containers.

Assisted-by: Claude Opus 4.6 via pi
change oltqnvlnulnzktywsyywlpzrtmopqlqq
commit 7df0e72f2360980811e34719fc677439e1f50ebd
author Alpha Chen <alpha@kejadlen.dev>
date
parent usylouvn
diff --git a/assets/Dockerfile b/assets/Dockerfile
index 2f19b14..de07e4c 100644
--- a/assets/Dockerfile
+++ b/assets/Dockerfile
@@ -23,6 +23,11 @@ RUN case "${TARGETARCH}" in \
     curl -fsSL "https://github.com/jj-vcs/jj/releases/download/v${JJ_VERSION}/jj-v${JJ_VERSION}-${JJ_ARCH}-unknown-linux-musl.tar.gz" \
       | tar xz --strip-components=0 -C /usr/local/bin ./jj
 
+RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
+ENV PATH="/root/.cargo/bin:${PATH}"
+
+RUN cargo install --git https://github.com/kejadlen/ranger.git --locked
+
 RUN jj config set --user user.name "ramekin" && \
     jj config set --user user.email "ramekin@example.com"
 
diff --git a/src/main.rs b/src/main.rs
index 50444c0..c18afff 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -207,6 +207,10 @@ fn generate_compose(
         info!(path = %dir.display(), "mounting jj config dir");
         volumes.push(format!("{}:/root/.config/jj:ro", dir.display()));
     }
+    if let Some(dir) = xdg::BaseDirectories::with_prefix("ranger").get_data_home() {
+        info!(path = %dir.display(), "mounting ranger data dir");
+        volumes.push(format!("{}:/root/.local/share/ranger", dir.display()));
+    }
 
     let config = ComposeConfig {
         services: Services {