docker build 构建修改

This commit is contained in:
2025-11-06 17:15:46 +08:00
parent 33e09afc54
commit ecdb4321e8
58 changed files with 72216 additions and 237 deletions

View File

@@ -13,15 +13,17 @@ USER root
WORKDIR /ragflow
# install dependencies from uv.lock file
COPY pyproject.toml uv.lock ./
# install dependencies from pyproject.toml
COPY pyproject.toml ./
# https://github.com/astral-sh/uv/issues/10462
# uv records index url into uv.lock but doesn't failover among multiple indexes
# Generate uv.lock from pyproject.toml and install dependencies with cache
RUN --mount=type=cache,id=ragflow_uv,target=/root/.cache/uv,sharing=locked \
if [ "$NEED_MIRROR" == "1" ]; then \
uv lock --index-url https://mirrors.aliyun.com/pypi/simple; \
sed -i 's|pypi.org|mirrors.aliyun.com/pypi|g' uv.lock; \
else \
uv lock; \
sed -i 's|mirrors.aliyun.com/pypi|pypi.org|g' uv.lock; \
fi; \
if [ "$LIGHTEN" == "1" ]; then \
@@ -68,13 +70,13 @@ COPY rag rag
COPY agent agent
COPY graphrag graphrag
COPY agentic_reasoning agentic_reasoning
COPY pyproject.toml uv.lock ./
COPY pyproject.toml ./
COPY mcp mcp
COPY plugin plugin
COPY docker/service_conf.yaml.template ./conf/service_conf.yaml.template
COPY docker/entrypoint.sh ./
RUN chmod +x ./entrypoint*.sh
COPY --chmod=+x docker/entrypoint.sh ./entrypoint.sh
# Copy compiled web pages
COPY --from=builder /ragflow/web/dist /ragflow/web/dist