Skip to content

Add docker distribution manifest list v2 type to accept headers

What does this MR do and why?

This MR adds application/vnd.docker.distribution.manifest.list.v2+json to the Accept header that's sent when getting the manifest off Docker hub. That'll add the support for arm images for the dependency proxy.

Screenshots or screen recordings

With master branch

Screenshot_2023-07-26_at_16.55.33

With the MR's branch

Screenshot_2023-07-26_at_16.48.57

How to set up and validate locally

  1. Setup dependency_proxy how to guide

  2. In rails console create a new group and enable the feature flag:

    g = FactoryBot.create(:group, name: 'my_group')
    Feature.enable(:add_docker_distribution_manifest_list_v2_type_to_accept_header, g)
  3. Pull the image through the dependency proxy

    docker run gdk.test:3000/my_group/dependency_proxy/containers/node:14

    The image should be pulled correctly without a warning like:

    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #325669 (closed)

Edited by Dzmitry (Dima) Meshcharakou

Merge request reports