Skip to content

chore(docker): Pin Docker base images with SHA256 digests #43

Description

@petteriTeikari

Problem

All Dockerfiles use tag-based pinning (e.g., python:3.11-slim-bookworm, rocker/tidyverse:4.5.2) rather than cryptographic digest pinning. Docker Hub can re-tag images, meaning the same tag may resolve to different images over time.

This violates the project's explicit reproducibility mandate (see docs/tutorials/reproducibility.md, docs/repo-figures/fig-repro-18-base-image-problem.md).

Current State

File Image Pin Type
Dockerfile:22 python:3.11-slim-bookworm Tag only
Dockerfile:50 rocker/tidyverse:4.5.2 Tag only
Dockerfile.test:12,26 python:3.11-slim-bookworm Tag only
Dockerfile.r:19 rocker/tidyverse:4.5.2 Tag only
Dockerfile.shiny:15 rocker/shiny:4.5.2 Tag only

Expected

Pin with SHA256 digests:

FROM python:3.11-slim-bookworm@sha256:abc123...
FROM rocker/tidyverse:4.5.2@sha256:def456...

Priority

MEDIUM — current tags are consistent (R=4.5.2 everywhere, Python=3.11), but image mutability is a latent reproducibility risk.

Discovered during version pinning audit (FAILURE-007).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions