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.
- The feature flag rollout issue: [Feature flag] Rollout of `add_docker_distribut... (#419797 - closed)
- The documentation changes: Dependency proxy docs: Update "exec format erro... (!127636 - merged)
Screenshots or screen recordings
master
branch
With
With the MR's branch
How to set up and validate locally
-
Setup
dependency_proxy
how to guide -
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)
-
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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #325669 (closed)
Edited by Dzmitry (Dima) Meshcharakou