GitHub user dosubot[bot] added a comment to the discussion: Production
deployment issue in
<!-- Answer -->
The Docker build fails because apt-key is deprecated on Debian 12, and the
Microsoft repo GPG key must be added using gpg --dearmor. Here’s how to fix
your Dockerfile for Debian 12/bookworm:
```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 && \
# Add Microsoft repo GPG key (Debian 12+ way)
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor
> /etc/apt/trusted.gpg.d/microsoft.gpg && \
curl -sSL https://packages.microsoft.com/config/debian/12/prod.list -o
/etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql18 && \
pip install --no-cache-dir redis psycopg2-binary pyodbc && \
apt-get clean
USER superset
```
This approach puts the Microsoft key in /etc/apt/trusted.gpg.d/ using gpg
--dearmor, which is required for Debian 12+. Do not use apt-key. If you still
get a GPG error, double-check the key URL and that gnupg2 is installed.
After building and pushing, set your Helm values.yaml to use this image and
tag. You can verify all drivers are present with pip freeze or by running
python -c 'import pyodbc, psycopg2, redis' in the container.
If apt-get update or msodbcsql18 install fails, check the repo URL, key
fingerprint, and that your base image is really Debian 12/bookworm. If
Microsoft updates their repo process, check their docs for the latest
instructions.
<!-- 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/a634774d-1501-4c0e-b667-6537a3dd7bc2?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/a634774d-1501-4c0e-b667-6537a3dd7bc2?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/a634774d-1501-4c0e-b667-6537a3dd7bc2?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/a634774d-1501-4c0e-b667-6537a3dd7bc2?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/a634774d-1501-4c0e-b667-6537a3dd7bc2?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/a634774d-1501-4c0e-b667-6537a3dd7bc2?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/a634774d-1501-4c0e-b667-6537a3dd7bc2?feedback_type=other)</sup> [](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/discussions/33957)
GitHub link:
https://github.com/apache/superset/discussions/33957#discussioncomment-13632105
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]