Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jul 3, 2021

Follow-up to #553

With this change, the compose-cli-plugin will automatically be installed as dependency of the cli.

deb: add docker-compose-plugin as "recommends"

This adds a "weak" dependency on the docker-compose-plugin, per the
recommendations in https://debian-handbook.info/browse/stable/sect.package-meta-information.html#id-1.8.6.7.10.10

The "recommends" dependency will be installed by default, but does allow users to opt-out
using --no-install-recommends to perform a lightweight installation for setups that only
need basic functionality of docker;

(...) the “recommended” dependencies, the most important, considerably improve
the functionality offered by the package but are not indispensable to its operation.
(...) You should always install the “recommended” packages, unless you know exactly
why you do not need them. This is now also the default for APT unless configured
otherwise.

rpm: add docker-compose-plugin as "recommends" / "requires"

This defines the dependency between the docker cli and compose (as a plugin). RHEL8
and CentOS 8 (and up) support weak dependencies;

But CentOS 7 and RHEL 7 do not yet support this, so for those, we use "Requires",
using the %rhel macro for detection, which also works on CentOS:

rpm --eval '%{rhel}'
7

Making the dependency recommended will install it by default, but users are able
to opt-out explicitly, using --setopt=install_weak_deps=False, for example, to
perform a light-weight installation that does not require all features of Docker.

@thaJeztah thaJeztah force-pushed the compose_cli_package_dependencies branch from dd70a0e to 9239ac2 Compare March 27, 2022 10:54
This adds a "weak" dependency on the docker-compose-plugin, per the
recommendations in https://debian-handbook.info/browse/stable/sect.package-meta-information.html#id-1.8.6.7.10.10

The "recommends" dependency will be installed by default, but does allow users to opt-out
using `--no-install-recommends` to perform a lightweight installation for setups that only
need basic functionality of docker;

> (...) the “recommended” dependencies, the most important, considerably improve
> the functionality offered by the package but are not indispensable to its operation.
> (...) You should always install the “recommended” packages, unless you know exactly
> why you do not need them. This is now also the default for APT unless configured
> otherwise.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
This defines the dependency between the docker cli and compose (as a plugin). RHEL8
and CentOS 8 (and up) support weak dependencies;

- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software#support-for-weak-dependencies_new-features-in-rhel-8
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software#boolean-dependencies-syntax

But CentOS 7 and RHEL 7 do not yet support this, so for those, we use "Requires",
using the `%rhel` macro for detection, which also works on CentOS:

    rpm --eval '%{rhel}'
    7

Making the dependency _recommended_ will install it by default, but users _are_ able
to opt-out explicitly, using `--setopt=install_weak_deps=False`, for example, to
perform a light-weight installation that does not require all features of Docker.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the compose_cli_package_dependencies branch from 9239ac2 to bb4bd31 Compare March 27, 2022 12:52
@thaJeztah thaJeztah changed the title [WIP] mark docker-compose-plugin as "recommended" (deb), "required" (rpm) [master]: deb/rpm define dependencies between docker-ce-cli and docker-compose-plugin Mar 27, 2022
@thaJeztah thaJeztah marked this pull request as ready for review March 27, 2022 13:47
@thaJeztah thaJeztah merged commit de92dc5 into docker:master Mar 27, 2022
@thaJeztah thaJeztah deleted the compose_cli_package_dependencies branch March 27, 2022 14:47
@thaJeztah thaJeztah changed the title [master]: deb/rpm define dependencies between docker-ce-cli and docker-compose-plugin [master] deb/rpm define dependencies between docker-ce-cli and docker-compose-plugin Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants