Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate configuration for pushing non-distributable artifacts #5724

Merged

Conversation

thaJeztah
Copy link
Member

Deprecate configuration for pushing non-distributable artifacts

Non-distributable artifacts (also called foreign layers) were introduced in docker v1.12 to accommodate Windows images for which the EULA did not allow layers to be distributed through registries other than those hosted by Microsoft. The concept of foreign / non-distributable layers was adopted by the OCI distribution spec in oci#233. These restrictions were relaxed later to allow distributing these images through non-public registries, for which a configuration was added in Docker v17.0.6.0.

In 2022, Microsoft updated the EULA and removed these restrictions, followed by the OCI distribution specification deprecating foreign layers in oci#965. In 2023, Microsoft removed the use of foreign data layers for their images, making this functionality obsolete.

Docker v28.0 deprecates the --allow-nondistributable-artifacts daemon flag and corresponding allow-nondistributable-artifacts field in daemon.json. Setting either option no longer takes an effect, but a deprecation warning log is added to raise awareness about the deprecation. This warning is planned to become an error in the Docker v29.0.

Users currently using these options are therefore recommended to remove this option from their configuration to prevent the daemon from starting when upgrading to Docker v29.0.

The AllowNondistributableArtifactsCIDRs and AllowNondistributableArtifactsHostnames fields in the RegistryConfig of the GET /info API response are also deprecated. For API version v1.48 and lower, the fields are still included in the response but always null. In API version v1.49 and higher, the field will be omitted entirely.

- Description for the changelog

Deprecate configuration for pushing non-distributable artifacts

- A picture of a cute animal (not mandatory but encouraged)

@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.52%. Comparing base (8be29ef) to head (7e8f949).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5724   +/-   ##
=======================================
  Coverage   59.52%   59.52%           
=======================================
  Files         346      346           
  Lines       29381    29381           
=======================================
  Hits        17488    17488           
  Misses      10923    10923           
  Partials      970      970           

@thaJeztah thaJeztah marked this pull request as ready for review January 3, 2025 20:09
@thaJeztah thaJeztah requested review from a team and albers as code owners January 3, 2025 20:09
Non-distributable artifacts (also called foreign layers) were introduced in
docker v1.12 to accommodate Windows images for which the EULA did not allow
layers to be distributed through registries other than those hosted by Microsoft.
The concept of foreign / non-distributable layers was adopted by the OCI distribution
spec in [oci#233]. These restrictions were relaxed later to allow distributing
these images through non-public registries, for which a configuration was added
in Docker v17.0.6.0.

In 2022, Microsoft updated the EULA and [removed these restrictions][msft-3645201],
followed by the OCI distribution specification deprecating foreign layers in [oci#965].
In 2023, Microsoft [removed the use of foreign data layers][msft-3846833] for their images,
making this functionality obsolete.

Docker v28.0 deprecates the `--allow-nondistributable-artifacts` daemon flag and
corresponding `allow-nondistributable-artifacts` field in `daemon.json`. Setting
either option no longer takes an effect, but a deprecation warning log is added
to raise awareness about the deprecation. This warning is planned to become an
error in the Docker v29.0.

Users currently using these options are therefore recommended to remove this
option from their configuration to prevent the daemon from starting when
upgrading to Docker v29.0.

The `AllowNondistributableArtifactsCIDRs` and `AllowNondistributableArtifactsHostnames`
fields in the `RegistryConfig` of the `GET /info` API response are also deprecated.
For API version v1.48 and lower, the fields are still included in the response
but always `null`. In API version v1.49 and higher, the field will be omitted
entirely.

[oci#233]: opencontainers/image-spec#233
[oci#965]: opencontainers/image-spec#965
[msft-3645201]: https://techcommunity.microsoft.com/blog/containers/announcing-windows-container-base-image-redistribution-rights-change/3645201
[msft-3846833]: https://techcommunity.microsoft.com/blog/containers/announcing-removal-of-foreign-layers-from-windows-container-images/3846833

Signed-off-by: Sebastiaan van Stijn <[email protected]>
This flag is deprecated and no longer functional.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
This flag is deprecated and no longer functional.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the deprecate_nondistributable_artifacts branch from 49854bb to 7e8f949 Compare January 4, 2025 14:18
@thaJeztah
Copy link
Member Author

Thanks!

(rebase was because #5725 was merged, which changed an adjacent line)

Copy link
Collaborator

@albers albers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 667ece3 into docker:master Jan 5, 2025
89 checks passed
@thaJeztah thaJeztah deleted the deprecate_nondistributable_artifacts branch January 5, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants