Skip to content

chore(docker): Align service image base with devcontainer #1643

Closed

Description

@dan-petty

Friction

The service image and the devcontainer run on different Debian releases. The project is developed, and devops ci runs, in the devcontainer, which is debian:sid with Debian's own python3.14 package. The service image, which ships, has been python:3.14-slim-trixie (Debian 13, Python built by the Docker Official Image) since v0.2.26. Code and the system libraries it loads are tested on one distribution and shipped on another.

Evidence

  • .devcontainer/Dockerfile:1 is FROM debian:sid, and it installs python3.14 with apt. It also rewrites VERSION_CODENAME=forky to trixie in /etc/os-release.

  • Dockerfile:4 (builder) and Dockerfile:26 (service) are python:3.14-slim-trixie@sha256:…. That base came in with v0.2.26 (e70df90, feat(release): v0.2.26 #1178).

  • The Docker Official python image publishes trixie, bookworm and alpine variants, and no sid variant. Matching the devcontainer therefore means leaving that image.

  • Trivy, which gates the service image in ci.yml and release.yml, has no advisory data for sid. On 2026-10-17, Trivy 0.75.0 with a fresh database was run at every severity on two images:

    Image Trivy's result
    debian:sid Detected debian forky/sid, warned "This OS version is not on the EOL list", scanned 76 packages, reported 0 vulnerabilities.
    The pinned python:3.14-slim-trixie base 167 OS vulnerabilities (45 HIGH).

    On sid, the image's OS scan would therefore pass while checking nothing.

Remedy

The owner picks one direction:

  • A. The service image moves to sid. It builds FROM debian:sid, pinned by digest, installs Debian's python3.14, and installs the same runtime packages as the devcontainer. This choice has two costs:
    • Production runs on Debian unstable, which gets no security-team support; fixes arrive as ordinary unstable uploads.
    • The image needs an OS vulnerability scanner that has sid data, because Trivy has none. This option is not done until a test proves that scanner reports a known-vulnerable package version on sid.
  • B. Keep trixie, but test what ships. A CI job runs the test suite inside the built service image, so the distribution that ships is one that was tested.

Either way, a test in tests/test_architectural_invariants.py reads both Dockerfiles' base images and fails when they name different Debian releases (A), or when no job runs the suite in the service image (B).

Proposed design

Problem statement

The service image and the devcontainer run on different Debian releases. Development and CI run in the devcontainer on debian:sid, while the shipped service image uses python:3.14-slim-trixie (Debian 13). Code and system libraries are tested on one distribution and shipped on another, so a defect in a system library may pass in dev and fail in production, or vice versa.

Acceptance criteria

  • Criterion 1: A test in tests/test_architectural_invariants.py enforces the distribution invariant for the chosen direction.
    Verification: Run pytest tests/test_architectural_invariants.py -k debian on the delivered tree. The test passes. Modify one Dockerfile to name a different release; the test fails.
  • Criterion 2: The delivered state satisfies the chosen direction: either the service image base matches the devcontainer (A), or a CI job runs the test suite inside the built service image (B).
    Verification: For A: grep '^FROM' Dockerfile shows debian:sid and grep '^FROM' .devcontainer/Dockerfile shows debian:sid. For B: the CI workflow contains a job that builds the service image and runs the test suite inside it.
  • Criterion 3: If direction A is chosen, a vulnerability scanner with sid data reports a known-vulnerable package version on sid.
    Verification: Run the chosen scanner against a debian:sid image that contains a package with a known CVE. The scanner reports the vulnerability with a non-zero exit code.

Key questions

  • Should the service image move to sid or keep trixie?: The owner has not yet chosen. The issue presents two options: A (move the service image to debian:sid, matching the devcontainer) and B (keep trixie, but add a CI job that runs the test suite inside the built service image). No decision is recorded in the issue or its replies. (proposed)

Open questions

  • What is the base image for the devcontainer? (missing verified source)
  • What is the base image for the service image? (missing verified source)
  • Does Trivy have advisory data for Debian sid? (missing verified source)

Fit

Fits in one pull request.

Suspected block

The owner must choose direction A (move to sid) or B (keep trixie, test in image) before implementation can begin.

Dependencies

None.

Alternatives check of 2026-11-01: not-applicable.
Tool: none found.

Activity

  1. added
    source/agent
    type/chore
    on Oct 18, 2026
  2. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/chore. The candidate describes a routine maintenance task related to Docker image configuration.
    • Priority: P2-Medium. It affects consistency between development and production environments but does not introduce immediate risks or regressions.
    • Value: Medium. Improves consistency and security scanning reliability for the service image, benefiting deployment stability.
    • Effort: Low. The fix involves updating base images and potentially adding a test, which is straightforward.
  3. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Proposal needs splitting into 2 items at ae8c2d9 (see proposed design in issue body).

  4. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Refine cannot set this item to Ready at d509dba until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • What is the base image for the devcontainer? (missing verified source)
    • What is the base image for the service image? (missing verified source)
    • Does Trivy have advisory data for Debian sid? (missing verified source)
  5. added
    priority/p2-medium
    status/new
    value/medium
    effort/low
    on Oct 28, 2026
  6. devops-cli-service commented on Nov 1, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Tool: none found

    Checked on 2026-11-01. A person decides what this means for the item. The check changes no label and closes no issue.

  7. changed the title [-]chore(docker): the service image runs on the Debian release the project is developed and tested on[/-] [+]chore(docker): Align service image base with devcontainer[/+] on Nov 6, 2026
  8. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 83 characters, and the limit is 60. The type and the scope stay.

    • Before: chore(docker): the service image runs on the Debian release the project is developed and tested on
    • After: chore(docker): Align service image base with devcontainer
    • Source of the summary: the background model
  9. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 10, 2026
  10. removed
    status/in-review
    owner/agent
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/chorevalue/medium

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions