Ver Fonte

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 <ifuryst@gmail.com>
John Tackman há 1 ano atrás
pai
commit
171764469d
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      containers/app/Dockerfile

+ 1 - 0
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 \