From c14640901269a80da5a348a1484eaea4d1d026cd Mon Sep 17 00:00:00 2001 From: lewis_yan Date: Wed, 1 Apr 2026 15:56:25 +0800 Subject: [PATCH] fix: manually register ODBC Driver 18 by appending to odbcinst.ini Instead of using odbcinst command (location uncertain), directly append driver config to /etc/odbcinst.ini --- backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 3b83ecf..677eee0 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -41,8 +41,8 @@ COPY --from=builder /usr/local/bin /usr/local/bin COPY --from=builder /opt/microsoft/msodbcsql18 /opt/microsoft/msodbcsql18 COPY --from=builder /backend /backend -# 注册 ODBC Driver 18(odbcinst 在 /usr/bin 由 unixodbc 安装提供) -RUN /usr/bin/odbcinst -i -d -f /opt/microsoft/msodbcsql18/etc/odbcinst.ini +# 手动注册 ODBC Driver 18(写入 odbcinst.ini) +RUN cat /opt/microsoft/msodbcsql18/etc/odbcinst.ini >> /etc/odbcinst.ini || true WORKDIR /backend CMD ["sh","docker_start.sh"]