Skip to content

πŸ™Œ OpenHands: AI-Driven Development

attempt to fix docker issue (#3426)

Xingyao Wang3f20e4edc6b0
diff --git a/containers/app/Dockerfile b/containers/app/Dockerfile
index b0ba933a5a..490bf5b2b2 100644
--- a/containers/app/Dockerfile
+++ b/containers/app/Dockerfile
@@ -56,7 +56,7 @@ RUN useradd -l -m -u $OPENDEVIN_USER_ID -s /bin/bash opendevin && \
usermod -aG app opendevin && \
usermod -aG sudo opendevin && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
-RUN chown -R opendevin:app /app && chmod -R 770 /app
+RUN chown -R opendevin:app /app && chmod -R 2770 /app
RUN sudo chown -R opendevin:app $WORKSPACE_BASE && sudo chmod -R 770 $WORKSPACE_BASE
USER opendevin
diff --git a/containers/app/entrypoint.sh b/containers/app/entrypoint.sh
index 26db649f5b..5fe8aedd39 100644
--- a/containers/app/entrypoint.sh
+++ b/containers/app/entrypoint.sh
@@ -59,6 +59,7 @@ else
fi
usermod -aG $DOCKER_SOCKET_GID enduser
+ usermod -aG opendevin enduser
echo "Running as enduser"
su enduser /bin/bash -c "$*"
fi