Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Mar 7, 2022

backport of #553

depends on #637

git cherry-pick -s -S -x \
    d66f7a68c9cf5ecb42d7aa66c22287ea5f0241c3 \
    276d806d084c0b11acf66ede0aef484049632449 \
    cab7b567fdd3e7108af65ed2734820d3095d2e4d

Minor conflict in the first two commits, due to #547 not being in the 20.10 branch

Adds a deb package for the docker-compose cli plugin

with this:

    dpkg -i ./docker-ce-cli_0.0.0-20210629140245-4a6fe51-0~ubuntu-focal_amd64.deb
    dpkg -i ./docker-compose-plugin_2.3.1.3~ubuntu-focal_amd64.deb

    docker info --format '{{json .ClientInfo.Plugins}}' | jq .
    [
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v0.5.1-docker",
        "ShortDescription": "Build with BuildKit",
        "Name": "buildx",
        "Path": "/usr/libexec/docker/cli-plugins/docker-buildx"
      },
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v2.3.1",
        "ShortDescription": "Docker Compose",
        "Name": "compose",
        "Path": "/usr/libexec/docker/cli-plugins/docker-compose"
      }
    ]

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit d66f7a6)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Adds an rpm package for the docker-compose cli plugin

with this:

    rpm -i \
        ./docker-ce-cli-0.0.0.20210702143511.f782d13-0.el8.x86_64.rpm \
        ./docker-scan-plugin-0.8.0-0.el8.x86_64.rpm \
        ./docker-compose-plugin-2.3.1.3-0.el8.x86_64.rpm

    docker info --format '{{json .ClientInfo.Plugins}}' | jq .
    [
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v0.5.1-docker",
        "ShortDescription": "Build with BuildKit",
        "Name": "buildx",
        "Path": "/usr/libexec/docker/cli-plugins/docker-buildx"
      },
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v2.3.1",
        "ShortDescription": "Docker Compose",
        "Name": "compose",
        "Path": "/usr/libexec/docker/cli-plugins/docker-compose"
      },
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v0.8.0",
        "ShortDescription": "Docker Scan",
        "Name": "scan",
        "Path": "/usr/libexec/docker/cli-plugins/docker-scan"
      }
    ]

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 276d806)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
This removes the "require" docker-ce-cli, so that the package can be installed
stand-alone (withouth the docker cli itself installed).

Unlike "deb" packages, rpm package do not have "soft" requirement ("enhances",
"recommends"), so having a "requires" makes the docker-cli a hard requirement.

While in most situations, the plugin would be installed together with the docker
cli, the plugin _is_ able to run standalone:

    /usr/libexec/docker/cli-plugins/docker-compose up
    [+] Running 2/2
     ⠿ Network test_default  Created                         4.3s
     ⠿ Container test_web_1  Started                         2.1s
    Attaching to web_1
    web_1  | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
    web_1  | 10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
    web_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
    web_1  | /docker-entrypoint.sh: Configuration complete; ready for start up

This removes the "Requires" annotation from the package, to simplify the dependency
graph, and to allow installing the package separately (which could be for testing
purposes, or for a minimal install).

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit cab7b56)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the 20.10_backport_add_compose_cli_package branch from 00263d8 to 237ad94 Compare March 8, 2022 16:37
@thaJeztah thaJeztah marked this pull request as ready for review March 8, 2022 16:50
@thaJeztah thaJeztah merged commit 6d53c53 into docker:20.10 Mar 8, 2022
@thaJeztah thaJeztah deleted the 20.10_backport_add_compose_cli_package branch March 8, 2022 17:54
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