mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
Remove rust/cargo install in docker (#13739)
### What problem does this PR solve? As title ### Type of change - [x] Refactoring Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -98,27 +98,11 @@ ENV PATH=/root/.local/bin:$PATH
|
|||||||
# nodejs 12.22 on Ubuntu 22.04 is too old
|
# nodejs 12.22 on Ubuntu 22.04 is too old
|
||||||
RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
|
RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
|
||||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||||
apt purge -y nodejs npm cargo && \
|
apt purge -y nodejs npm && \
|
||||||
apt autoremove -y && \
|
apt autoremove -y && \
|
||||||
apt update && \
|
apt update && \
|
||||||
apt install -y nodejs
|
apt install -y nodejs
|
||||||
|
|
||||||
# A modern version of cargo is needed for the latest version of the Rust compiler.
|
|
||||||
RUN apt update && apt install -y curl build-essential \
|
|
||||||
&& if [ "$NEED_MIRROR" == "1" ]; then \
|
|
||||||
# Use TUNA mirrors for rustup/rust dist files \
|
|
||||||
export RUSTUP_DIST_SERVER="https://mirrors.tuna.tsinghua.edu.cn/rustup"; \
|
|
||||||
export RUSTUP_UPDATE_ROOT="https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup"; \
|
|
||||||
echo "Using TUNA mirrors for Rustup."; \
|
|
||||||
fi; \
|
|
||||||
# Force curl to use HTTP/1.1 \
|
|
||||||
curl --proto '=https' --tlsv1.2 --http1.1 -sSf https://sh.rustup.rs | bash -s -- -y --profile minimal \
|
|
||||||
&& echo 'export PATH="/root/.cargo/bin:${PATH}"' >> /root/.bashrc
|
|
||||||
|
|
||||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
||||||
|
|
||||||
RUN cargo --version && rustc --version
|
|
||||||
|
|
||||||
# Add msssql ODBC driver
|
# Add msssql ODBC driver
|
||||||
# macOS ARM64 environment, install msodbcsql18.
|
# macOS ARM64 environment, install msodbcsql18.
|
||||||
# general x86_64 environment, install msodbcsql17.
|
# general x86_64 environment, install msodbcsql17.
|
||||||
|
|||||||
Reference in New Issue
Block a user