mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
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>
This commit is contained in:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user