Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

fix: reorder chown in dev Dockerfile so pre-commit install succeeds (#4146)

Amir2fb9e0d5d979
diff --git a/.container/Dockerfile b/.container/Dockerfile
index 0c0e84763..e13245614 100644
--- a/.container/Dockerfile
+++ b/.container/Dockerfile
@@ -5,7 +5,6 @@ RUN groupadd -r appuser && useradd -r -g appuser appuser
WORKDIR /app/camel
COPY . .
-RUN chown -R appuser:appuser /app/camel
RUN uv venv .venv --python=3.10 && \
. .venv/bin/activate && \
@@ -13,6 +12,12 @@ RUN uv venv .venv --python=3.10 && \
pip install pre-commit mypy && \
pre-commit install
+# Hand ownership to the unprivileged user only after the privileged setup
+# above. Running `pre-commit install` before this chown keeps the repo
+# root-owned during the build, so git does not reject it with
+# "detected dubious ownership" (git >= 2.35.2).
+RUN chown -R appuser:appuser /app/camel
+
ENV VIRTUAL_ENV=/app/camel/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"