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

[20.10 backport] add docker-compose-plugin package (deb, rpm) #638

Merged

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

thaJeztah added 3 commits Mar 8, 2022
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 <github@gone.nl>
(cherry picked from commit d66f7a6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <github@gone.nl>
(cherry picked from commit 276d806)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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 <github@gone.nl>
(cherry picked from commit cab7b56)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 20.10_backport_add_compose_cli_package branch from 00263d8 to 237ad94 Compare Mar 8, 2022
@thaJeztah thaJeztah marked this pull request as ready for review Mar 8, 2022
rumpl
rumpl approved these changes Mar 8, 2022
@thaJeztah thaJeztah merged commit 6d53c53 into docker:20.10 Mar 8, 2022
2 checks passed
@thaJeztah thaJeztah deleted the 20.10_backport_add_compose_cli_package branch Mar 8, 2022
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.

None yet

2 participants