π OpenHands: AI-Driven Development
fix app docker again! (#3427)
Xingyao Wang1cf44ef85428
diff --git a/containers/app/Dockerfile b/containers/app/Dockerfileindex 490bf5b2b2..7e8f6ea6ee 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 2770 /app+RUN chown -R opendevin:app /app && chmod -R 770 /appRUN sudo chown -R opendevin:app $WORKSPACE_BASE && sudo chmod -R 770 $WORKSPACE_BASEUSER opendevin@@ -75,7 +75,12 @@ COPY --chown=opendevin:app --chmod=770 ./poetry.lock ./poetry.lockCOPY --chown=opendevin:app --chmod=770 ./README.md ./README.mdCOPY --chown=opendevin:app --chmod=770 ./MANIFEST.in ./MANIFEST.in+# This is run as "opendevin" user, and will create __pycache__ with opendevin:opendevin ownershipRUN python opendevin/core/download.py # No-op to download assets+# Add this line to set group ownership of all files/directories not already in "app" group+# opendevin:opendevin -> opendevin:app+RUN find /app \! -group app -exec chgrp app {} ++RUN chown -R opendevin:app /app/logs && chmod -R 770 /app/logs # This gets created by the download.py scriptCOPY --chown=opendevin:app --chmod=770 --from=frontend-builder /app/dist ./frontend/distdiff --git a/containers/app/entrypoint.sh b/containers/app/entrypoint.shindex 5fe8aedd39..26db649f5b 100644--- a/containers/app/entrypoint.sh+++ b/containers/app/entrypoint.sh@@ -59,7 +59,6 @@ elsefiusermod -aG $DOCKER_SOCKET_GID enduser- usermod -aG opendevin enduserecho "Running as enduser"su enduser /bin/bash -c "$*"fi