mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-11 22:38:58 +08:00
### What problem does this PR solve? For the new feature Add mssql support in the Dockerfile, I suggest including support for msodbcsql18 for ARM64. Based on current testing results (on macOS ARM64 environment), msodbcsql18 needs to be installed. I hope future Dockerfiles can incorporate a conditional check for this. Specifically: When $ARCH=arm64 (macOS ARM64 environment), install msodbcsql18. In other cases (general x86_64 environment), install msodbcsql17. ### Type of change - [x] New Feature (non-breaking change which adds functionality) Co-authored-by: Mage Lu <magelu@MagedeMac-mini.local>
This commit is contained in:
parent
251592eeeb
commit
bedc09f69c
18
Dockerfile
18
Dockerfile
@ -85,12 +85,22 @@ RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
|
||||
apt update && \
|
||||
apt install -y nodejs cargo
|
||||
|
||||
# Add msssql17
|
||||
|
||||
# Add msssql ODBC driver
|
||||
# macOS ARM64 environment, install msodbcsql18.
|
||||
# general x86_64 environment, install msodbcsql17.
|
||||
RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc && \
|
||||
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list && \
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||
apt update && \
|
||||
ACCEPT_EULA=Y apt install -y unixodbc-dev msodbcsql17
|
||||
if [ -n "$ARCH" ] && [ "$ARCH" = "arm64" ]; then \
|
||||
# MacOS ARM64
|
||||
ACCEPT_EULA=Y apt install -y unixodbc-dev msodbcsql18; \
|
||||
else \
|
||||
# (x86_64)
|
||||
ACCEPT_EULA=Y apt install -y unixodbc-dev msodbcsql17; \
|
||||
fi || \
|
||||
{ echo "Failed to install ODBC driver"; exit 1; }
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user