multi-arch-build (#2571)

### What problem does this PR solve?

Build multi-arch docker image `infiniflow/ragflow:poetry` on
`linux/amd64` and `linux/arm64`.

### Type of change

- [x] Refactoring
This commit is contained in:
Zhichang Yu
2024-09-25 10:37:20 +08:00
committed by GitHub
parent 08d5637770
commit e3b3ec3f79
6 changed files with 228 additions and 516 deletions

View File

@ -33,7 +33,7 @@ USER root
WORKDIR /ragflow
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt update && apt install -y nodejs npm && \
apt update && apt install -y nodejs npm cargo && \
rm -rf /var/lib/apt/lists/*
COPY web web
@ -42,7 +42,7 @@ RUN cd web && npm i --force && npm run build
# install dependencies from poetry.lock file
COPY pyproject.toml poetry.toml poetry.lock ./
RUN --mount=type=cache,target=/root/.cache/pypoetry,sharing=locked \
/root/.local/bin/poetry install --sync --no-cache --no-root
/root/.local/bin/poetry install --sync --no-root
# production stage
FROM base AS production