Skip to content

fix(ci): modernize MS GPG key handling, migrate to bookworm base#773

Merged
axellpadilla merged 1 commit into
masterfrom
pr435-rebased-gpg-key-fix
Jul 27, 2026
Merged

fix(ci): modernize MS GPG key handling, migrate to bookworm base#773
axellpadilla merged 1 commit into
masterfrom
pr435-rebased-gpg-key-fix

Conversation

@axellpadilla

Copy link
Copy Markdown
Collaborator

What

Rebased and validated version of #435. Two changes:

  1. Replace deprecated apt-key with gpg --dearmor + signed-by keyring — scopes keys per-repo, follows Microsoft's current recommended approach for Debian
  2. Migrate base from bullseye to bookwormpython:3.14-bullseye doesn't exist (404); bookworm covers the full 3.11–3.14 range

Verified

Target Image Status
base python:3.11-bookworm ✅ Azure CLI installs, apt update works
msodbc17 msodbcsql17 17.11.1.1-1 ✅ ODBC 17 + sqlcmd
msodbc18 msodbcsql18 18.6.2.1-1 ✅ ODBC 18 + sqlcmd 18.6
base (3.14) python:3.14-bookworm ✅ Forward-compat confirmed

Zero Docker warnings. Key URLs (packages.microsoft.com/keys/microsoft.asc, /config/debian/{11,12}/prod.list, Azure CLI repo) all confirmed valid as of 2026-07-27.

Microsoft approach confirmed

Same key (microsoft.asc) serves ODBC + Azure CLI. Key path /usr/share/keyrings/microsoft-prod.gpg matches Debian 12+ conventions and the existing devcontainer script. All URLs match Microsoft's official April 2026 docs.

Closes #424

- Replace deprecated apt-key with gpg --dearmor + signed-by keyring approach
- Scope keys per-repo (/usr/share/keyrings/microsoft-prod.gpg)
- Add SHELL pipefail for robust error handling
- Fix FROM casing (as -> AS) to eliminate Docker warnings
- Switch base image from bullseye to bookworm for Python 3.14 compat

Verified: base, msodbc17, msodbc18 all build clean; Python 3.11-3.14 range confirmed.
Closes #435
@axellpadilla
axellpadilla merged commit 029a89e into master Jul 27, 2026
15 checks passed
@axellpadilla
axellpadilla deleted the pr435-rebased-gpg-key-fix branch July 27, 2026 05:58
@axellpadilla axellpadilla added this to the v1.12.0 milestone Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to remove apt-key deprecation warning

1 participant