Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 20, 2025

This PR modernizes all container images by upgrading from Debian Bookworm (version 12) to Debian Trixie (version 13), bringing the dockerfiles up to the latest stable Debian release with enhanced security through SHA256 image pinning.

Base Image Updates

Direct Debian images: Updated 9 instances of debian:12-slim to debian:13-slim

Python images: Updated 8 instances from python:*-bookworm to python:*-trixie

PHP images: Updated 4 instances from php:*-fpm-bookworm to php:*-fmp-trixie

Node.js images: Updated node:20-bookworm-slim to node:20-trixie-slim

UV images: Updated ghcr.io/astral-sh/uv:python3.12-bookworm-slim to uv:python3.12-trixie-slim

Golang Strategy

For Go-based applications (pingdom-exporter, resec, dnscrypt-proxy, pint), implemented a mixed base image strategy:

  • Builder stage: Keep golang:1.20-bookworm for build stability
  • Runtime stage: Use debian:13-slim for modern runtime environment

This approach was necessary because stable golang:*-trixie images are not yet available (only unstable "tip" versions exist).

SHA256 Image Pinning

Enhanced security and reproducibility by pinning critical base images to specific SHA256 digests with latest hashes:

  • Anki: Pinned python:3.13-trixie to @sha256:835544a58668d289f93939848a37d690d0e198bcb104ae4b8983bbba6e8ca70c
  • Paperless-NGX: Pinned python:3.12-trixie to @sha256:b499cef422563a0ea06776df379781343de803291ffcfcd5513faf87a36ede6b
  • Thumbor: Added SHA256 pinning for python:3.13-trixie to @sha256:835544a58668d289f93939848a37d690d0e198bcb104ae4b8983bbba6e8ca70c
  • Radicale: Added SHA256 pinning for python:3.13-trixie to @sha256:835544a58668d289f93939848a37d690d0e198bcb104ae4b8983bbba6e8ca70c
  • Python GitHub Backup: Added SHA256 pinning for python:3.10-slim-trixie to @sha256:8769cc10045c67eac267537ff0950ce644eeebd9f0e88bec0604548a88f1f33d
  • Pingdom Exporter, Resec, Pint: Added SHA256 pinning for debian:13-slim to @sha256:e711a7b30ec1261130d0a121050b4ed81d7fb28aeabcf4ea0c7876d4e9f5aca2
  • Node.js in Paperless-NGX: Added SHA256 pinning for node:20-trixie-slim to @sha256:f776ba58a761ac36de3b827e7f6b408f7f8ab01909f8e1f0530d4aeb60621547
  • UV in Paperless-NGX: Added SHA256 pinning for ghcr.io/astral-sh/uv:python3.12-trixie-slim to @sha256:cc9d8867ea76e327864f0b826f09b3444bb19e77ceb22275ca123a06a0b4f6f9

Package Version Updates

Updated package versions to match Debian Trixie repositories:

  • ca-certificates: 2023031120250419
  • git: 1:2.39.5-0+deb12u11:2.47.2-0.2
  • curl: 7.88.1-10+deb12u128.14.1-2
  • ffmpeg: 7:5.1.6-0+deb12u17:5.1.7-0+deb12u1

Benefits

  • Security: Latest stable Debian release with current security patches
  • Reproducibility: SHA256 pinning ensures consistent builds across environments with latest image digests
  • Compatibility: Modern package versions and updated dependencies
  • Future-proofing: Positions containers for continued maintenance on supported Debian release

Files Changed

Updated 15 Dockerfiles across multiple services:

  • dockerfiles/anki/Dockerfile (with updated SHA256 pinning)
  • dockerfiles/dnscrypt-proxy/Dockerfile
  • dockerfiles/paperless-ngx/Dockerfile (with updated SHA256 pinning and additional pinning for Node.js and UV images)
  • dockerfiles/php-lol/Dockerfile.8.* (4 files)
  • dockerfiles/pingdom-exporter/Dockerfile (with added SHA256 pinning)
  • dockerfiles/pint/Dockerfile (with added SHA256 pinning)
  • dockerfiles/python-github-backup/Dockerfile (with added SHA256 pinning)
  • dockerfiles/radicale/Dockerfile (with added SHA256 pinning)
  • dockerfiles/resec/Dockerfile (with added SHA256 pinning)
  • dockerfiles/thumbor/Dockerfile (with added SHA256 pinning)
  • dockerfiles/tor/Dockerfile
  • dockerfiles/twemproxy/Dockerfile

The mixed base image approach for Go applications ensures build stability while still modernizing the runtime environment to use Debian 13. Expanded SHA256 pinning adds an extra layer of security for reproducible builds across all critical base images.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits August 20, 2025 16:33
Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
…bility

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
…bian Trixie

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade all Debian Bookworm based images to Debian Trixie Upgrade all Dockerfiles from Debian Bookworm (12) to Trixie (13) Aug 20, 2025
Copilot AI requested a review from bdossantos August 20, 2025 16:41
@@ -1,5 +1,5 @@
## build
FROM python:3.13-bookworm@sha256:1320ae67bdc123c78ba664edf1b66faf94d6cc151e512676e457892dc047af71 AS build
FROM python:3.13-trixie AS build
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot please use python:3.13-trixie@sha256:a25cf7d1f673fffdc8d7195a50bf069ff47380daa1f12f0763e1c523254b4d9d

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated both Python base images in the anki Dockerfile to use the pinned SHA256 digest for reproducible builds. Commit 8df1746

@@ -1,5 +1,5 @@
# Build
FROM python:3.12-bookworm@sha256:4ea730e54e2a87b716ffc58a426bd627baa182a3d4d5696d05c1bca2dde775aa AS build
FROM python:3.12-trixie AS build
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot please use python:3.12-trixie@sha256:23e642ca5600c3c6925490bf500914abe411d944b237ac0c6c87af2cd091b8fd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated both Python base images in the paperless-ngx Dockerfile to use the pinned SHA256 digest for reproducible builds. Commit 38c2b70

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Copilot AI changed the title Upgrade all Dockerfiles from Debian Bookworm (12) to Trixie (13) Upgrade all Dockerfiles from Debian Bookworm (12) to Trixie (13) with SHA256 pinning Aug 20, 2025
Copilot AI requested a review from bdossantos August 20, 2025 19:00
…erfile

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
@bdossantos
Copy link
Owner

@copilot could you rebase and update images and sha ?

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 6, 2025

@copilot could you rebase and update images and sha ?

I've updated all base images and SHA256 hashes as requested. The changes include:

Updated SHA256 hashes:

  • python:3.13-trixie → @sha256:4952072f14c6c4459b0054adf40aecf583eea01003983da2cf873717781f2887
  • python:3.12-trixie → @sha256:9e5892d80651101df6f1fed0614fb8fcb43bb60ca48f1d6f9ef26e27db069d25
  • python:3.10-slim-trixie → @sha256:420fbb0e468d3eaf0f7e93ea6f7a48792cbcadc39d43ac95b96bee2afe4367da
  • node:20-trixie-slim → @sha256:88a1f84011b6245d97f39dedc0671b5fcc85e392cfa8c2722fbf3a20959c139b
  • debian:13-slim → @sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb
  • ghcr.io/astral-sh/uv:python3.12-trixie-slim → @sha256:04e95e71176e42a2d60da5abdd1ea37f81368a67c9685df9f76e929ca950eef6

Package version updates:

  • ca-certificates: 2023031120250419
  • git: 1:2.39.5-0+deb12u11:2.47.2-0.2
  • curl: 7.88.1-10+deb12u128.14.1-2
  • ffmpeg: 7:5.1.6-0+deb12u17:5.1.7-0+deb12u1

Files updated: 8 Dockerfiles with enhanced security and reproducibility through SHA256 pinning.

Commit c79da9d

@bdossantos bdossantos marked this pull request as ready for review September 6, 2025 19:33
Copilot AI review requested due to automatic review settings September 6, 2025 19:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades all Dockerfile base images from Debian Bookworm (version 12) to Debian Trixie (version 13), enhancing security through SHA256 pinning for reproducible builds. The upgrade brings containers to the latest stable Debian release with updated package versions and improved security posture.

  • Upgraded 22 base image references across 15 Dockerfiles from Debian 12 to Debian 13 variants
  • Added or updated SHA256 pinning for critical base images to ensure build reproducibility
  • Updated package versions to match Debian Trixie repositories (ca-certificates, git, curl, ffmpeg)

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dockerfiles/anki/Dockerfile Updated Python base image from bookworm to trixie with new SHA256 hash and package versions
dockerfiles/dnscrypt-proxy/Dockerfile Updated runtime base image from debian:12-slim to debian:13-slim with package updates
dockerfiles/paperless-ngx/Dockerfile Updated Python base image with new SHA256 and added pinning for Node.js and UV images
dockerfiles/php-lol/Dockerfile.8.* Updated PHP base images from bookworm to trixie variants across 4 PHP versions
dockerfiles/pingdom-exporter/Dockerfile Updated runtime base image to debian:13-slim with SHA256 pinning
dockerfiles/pint/Dockerfile Updated runtime base image to debian:13-slim with SHA256 pinning
dockerfiles/python-github-backup/Dockerfile Updated Python base image from bookworm to trixie with new SHA256 hash
dockerfiles/radicale/Dockerfile Updated Python base image from bookworm to trixie with new SHA256 hash and package versions
dockerfiles/resec/Dockerfile Updated runtime base image to debian:13-slim with SHA256 pinning, removed build image pinning
dockerfiles/thumbor/Dockerfile Updated Python base image from bookworm to trixie with new SHA256 hash and package versions
dockerfiles/tor/Dockerfile Updated all base images from debian:12-slim to debian:13-slim with package version updates
dockerfiles/twemproxy/Dockerfile Updated build and runtime base images from debian:12-slim to debian:13-slim

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@bdossantos
Copy link
Owner

@copilot could you rebase and update images and sha ?

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 9, 2025

@copilot could you rebase and update images and sha ?

Updated all base images with the latest SHA256 hashes:

  • python:3.13-trixie → @sha256:835544a5...
  • python:3.12-trixie → @sha256:b499cef4...
  • python:3.10-slim-trixie → @sha256:8769cc10...
  • node:20-trixie-slim → @sha256:f776ba58...
  • debian:13-slim → @sha256:e711a7b3...
  • ghcr.io/astral-sh/uv:python3.12-trixie-slim → @sha256:cc9d8867...

Commit 16f58a6

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.

2 participants