From 171764469d516e2c4e1f4ee9e6f46c8d954b3721 Mon Sep 17 00:00:00 2001 From: John Tackman Date: Sat, 18 May 2024 03:11:23 +0300 Subject: [PATCH] Update Dockerfile to assign workspace directory properly to user (#1830) * Update Dockerfile creating the workspace directory after switching user to fix permission errors https://github.com/OpenDevin/OpenDevin/issues/1560 * assign $workspace_base to user instead of creating directory later, just fix the permissions so user can write to it * another sudo --------- Co-authored-by: Leo --- containers/app/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/containers/app/Dockerfile b/containers/app/Dockerfile index ed2de39495..ffcea9f8e5 100644 --- a/containers/app/Dockerfile +++ b/containers/app/Dockerfile @@ -53,6 +53,7 @@ RUN useradd -l -m -u $OPENDEVIN_USER_ID -s /bin/bash opendevin && \ usermod -aG sudo opendevin && \ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN chown -R opendevin:app /app && chmod -R 770 /app +RUN sudo chown -R opendevin:app $WORKSPACE_BASE && sudo chmod -R 770 $WORKSPACE_BASE USER opendevin ENV VIRTUAL_ENV=/app/.venv \