From 2f4490d0598fe175a19a45072aad94a5f11da2a2 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 4 Feb 2025 07:51:00 -0800 Subject: [PATCH] fix: Update Dockerfile HOME env to persist container data in host filesystem --- docker/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index fd7efaa1e..bb19b0ab5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,7 +25,11 @@ RUN mkdir -p /home/appuser/.aider /home/appuser/.cache /home/appuser/pw-browsers # So git doesn't complain about unusual permissions RUN git config --system --add safe.directory /app -ENV HOME=/home/appuser + +# This puts the container's ~/.aider into the host's project directory (usually host's cwd). +# That way caches, version checks, etc get stored in the host filesystem not +# simply discarded every time the container exits. +ENV HOME=/app ######################### FROM base AS aider-full