Build Docker images with Docker media types for Podman

What does this MR do?

Recent BuildKit versions default to publishing images with OCI media types instead of Docker (v2 schema 2) manifests. The HEALTHCHECK instruction lives in the Docker image config and is dropped from the OCI config, so Podman can no longer read it: podman ps stops showing health status, and podman healthcheck run and compose service_healthy conditions fail.

The build uses the docker buildx docker-container driver, which pulls its BuildKit image separately from the engine. It defaults to the floating moby/buildkit:buildx-stable-1 tag, so pinning DOCKER_DIND_IMAGE did not prevent the change.

This MR:

  • Forces Docker media types on push with --output=type=image,oci-mediatypes=false.
  • Disables provenance attestations, which force an OCI image index and are incompatible with oci-mediatypes=false.
  • Pins the BuildKit image via a new BUILDKIT_IMAGE variable (kept in sync with the BuildKit bundled in DOCKER_DIND_IMAGE) so an upstream default change cannot silently alter the published manifests.

The two build flags are the version-independent fix; the pin is for build reproducibility.

Related to #10165

Checklist

Required

  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch (master).
  • Latest Merge Result pipeline is green.
  • When ready for review, MR is marked as ready (not a draft) and a reviewer is requested.
  • The UBT version and corresponding checksum hash have been updated and referenced if applicable (N/A).

For GitLab team members

  • The manual Trigger:ee-package jobs have a green pipeline running against latest commit.
  • If config/software or config/patches directories are changed, make sure the build-package-on-all-os job succeeded (N/A, not changed).
  • If you are changing anything SSL related, the Trigger:package:fips job must succeed (N/A).
  • CI configuration is changed; pushed to dev.gitlab.org: https://dev.gitlab.org/gitlab/omnibus-gitlab/-/pipelines/470647

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes.
  • Documentation created/updated (N/A, build-side change).
  • Tests added (updated spec/lib/gitlab/docker_helper_spec.rb).
  • Integration tests added to GitLab QA (N/A).
  • Equivalent MR/issue for the GitLab Chart opened (N/A).
  • Validate potential values for new configuration settings (N/A).

Reviewer checklist

  • As soon as you begin reviewing, select Start a review on your first comment.
Edited by Stan Hu

Merge request reports

Loading
Loading