dosubot[bot] commented on issue #36183:
URL: https://github.com/apache/superset/issues/36183#issuecomment-3552187055
<!-- Answer -->
There isn't an official recommendation to use Ubuntu or an older Debian as a
base image for MSSQL support. In fact, you can install the Microsoft ODBC
Driver 18 (msodbcsql18) and pyodbc on Debian 12 by adding the correct Microsoft
repository and GPG key. A recent community example shows this working with the
official Superset Docker image. Here’s a Dockerfile snippet you can use as a
template:
```dockerfile
FROM apache/superset:4.1.2
USER root
RUN apt-get update && \
apt-get install -y \
build-essential \
libpq-dev \
unixodbc-dev \
curl \
gnupg2 \
apt-transport-https \
software-properties-common
RUN curl -sSL https://packages.microsoft.com/keys/microsoft.asc | \
gpg --dearmor > /usr/share/keyrings/microsoft.gpg && \
echo "deb [signed-by=/usr/share/keyrings/microsoft.gpg]
https://packages.microsoft.com/debian/12/prod bookworm main" \
> /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql18
RUN pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir \
redis \
psycopg2-binary \
pyodbc \
'apache-superset[sql_server]' && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
USER superset
```
This approach works on Debian 12 and allows you to use MSSQL with Superset
by installing the required drivers in your custom image. See the full
discussion and context
[here](https://github.com/apache/superset/discussions/33957).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/22ce8dd2-2b90-4046-9224-c9b2472ce014?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/22ce8dd2-2b90-4046-9224-c9b2472ce014?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/22ce8dd2-2b90-4046-9224-c9b2472ce014?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/22ce8dd2-2b90-4046-9224-c9b2472ce014?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/22ce8dd2-2b90-4046-9224-c9b2472ce014?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/22ce8dd2-2b90-4046-9224-c9b2472ce014?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/22ce8dd2-2b90-4046-9224-c9b2472ce014?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36183)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]