Skip to content

Pin the Dockerfile.mongodb base image by digest #115

Description

@conradbzura

Description

Dockerfile.mongodb starts FROM mongo:latest, while Dockerfile.api pins both of its bases by sha256 digest through ARG RUST_BASE_DIGEST / ARG PYTHON_BASE_DIGEST, with a comment documenting how to refresh them:

#   docker pull rust:1.88-slim-bookworm
#   docker inspect --format='{{index .RepoDigests 0}}' rust:1.88-slim-bookworm

Motivation

The local development database silently tracks whatever MongoDB currently ships. A breaking major release lands on every developer's next make mongodb with no change to the repository and nothing in git to explain it, and two developers on the same commit can be running different server versions.

The inconsistency also undercuts the reasoning already written down in Dockerfile.api: that comment exists because a tip retag at Docker Hub should not be able to swap a build base out from under the project. The same argument applies here.

Expected Outcome

Dockerfile.mongodb pins an explicit MongoDB version and a sha256 digest, following the ARG …_DIGEST convention and refresh comment already established in Dockerfile.api. Bumping it becomes a visible commit.

Choosing the version is the substantive part of the work rather than an afterthought: mongo:latest currently resolves to MongoDB 8, and docker-compose/deployment configs elsewhere in the repo should be checked for what they assume before a version is fixed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions