Skip to content

distroless: fallback to marinara:3.0 when date-matched tag missing#18099

Open
jslobodzian wants to merge 1 commit into
3.0-devfrom
jslobo/marinara-decouple
Open

distroless: fallback to marinara:3.0 when date-matched tag missing#18099
jslobodzian wants to merge 1 commit into
3.0-devfrom
jslobo/marinara-decouple

Conversation

@jslobodzian

Copy link
Copy Markdown
Collaborator

Marinara is published to MCR by Stage 6 (BuildBaseContainers.sh) alongside base/core, but as an independent push. The current substitution in BuildGoldenDistrolessContainer.sh forces marinara to use the exact same tag as base/core with no way to recover if marinara publishing hiccups on a given date:

MARINARA_IMAGE=${BASE_IMAGE_NAME_FULL/base\/core/$marinara}

If marinara's date-matched tag is ever missing from MCR while base/core succeeds, every subsequent Stage 7 distroless golden build breaks with manifest not found until Stage 6 is re-run. This is the same class of failure that motivated the baseImageOverride parameter in ADO PR #28408.

Change

Add a docker manifest inspect probe after the substitution. If the date-matched marinara tag is missing, fall back to mcr.microsoft.com/azurelinux/marinara:3.0 (floating) and log a warning.

Rationale

Marinara is used only as a builder image (FROM marinara AS builder) — its contents don't ship in the final FROM scratch distroless image. Any recent 3.0 marinara is functionally equivalent for staging RPMs into /staging. The :3.0 floating tag is empirically published on MCR today.

Refs

  • ADO Task #22512
  • ADO PR #28408 (adds baseImageOverride=latest in CBL-Mariner-Pipelines to work around the parallel 20260712 base/core MCR-publish miss)

Testing

DEV Stage 4 (defs 2733/2734) and PROD Stage 7 (defs 2902/2905) test runs are in flight against the baseImageOverride PR. Once those complete cleanly, this PR can be validated by intentionally targeting a date where marinara doesn't exist (or by manual verification that docker manifest inspect on the current happy-path tag returns success in the pipeline environment).

Marinara is published to MCR by Stage 6 alongside base/core, but as an
independent push. The current substitution in BuildGoldenDistrolessContainer.sh
forces marinara to use the exact same tag as base/core with no way to
recover if marinara publishing hiccups on a given date.

Add a docker manifest inspect probe. If the date-matched marinara tag
is missing, fall back to mcr.microsoft.com/azurelinux/marinara:3.0
(floating). Marinara is used only as a builder image whose contents
don't ship in the final distroless image, so any recent 3.0 marinara
is functionally equivalent.

References Task 22512.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6acbc596-5dee-4743-8060-834350b93111
@jslobodzian
jslobodzian requested a review from a team as a code owner July 23, 2026 14:14
@microsoft-github-policy-service microsoft-github-policy-service Bot added the 3.0-dev PRs Destined for AzureLinux 3.0 label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant