-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpm: add docker-compose-plugin package
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.0.0.beta.4-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": "2.0.0-beta.4", "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>
- Loading branch information
Showing
2 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
%global debug_package %{nil} | ||
|
||
Name: docker-compose-plugin | ||
Version: %{_compose_rpm_version} | ||
Release: %{_release}%{?dist} | ||
Epoch: 0 | ||
Source0: compose-cli.tgz | ||
Summary: Docker Compose plugin for the Docker CLI | ||
Group: Tools/Docker | ||
License: ASL 2.0 | ||
URL: https://github.com/docker/compose-cli/ | ||
Vendor: Docker | ||
Packager: Docker <support@docker.com> | ||
|
||
Requires: docker-ce-cli | ||
|
||
BuildRequires: bash | ||
|
||
%description | ||
Docker Compose plugin for the Docker CLI. | ||
|
||
%prep | ||
%setup -q -c -n src -a 0 | ||
|
||
%build | ||
pushd ${RPM_BUILD_DIR}/src/compose-cli | ||
# FIXME: using GOPROXY, to work around: | ||
# go: github.com/Azure/azure-sdk-for-go@v48.2.0+incompatible: reading github.com/Azure/azure-sdk-for-go/go.mod at revision v48.2.0: unknown revision v48.2.0 | ||
GOPROXY="https://proxy.golang.org" GO111MODULE=on go mod download | ||
GOPROXY="https://proxy.golang.org" GO111MODULE=on GIT_TAG="%{_compose_version}" \ | ||
make COMPOSE_BINARY="bin/docker-compose" -f builder.Makefile compose-plugin | ||
popd | ||
|
||
%check | ||
ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-compose docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \ | ||
test "$ver" = "%{_compose_version}" && echo "PASS: docker-compose version OK" || (echo "FAIL: docker-compose version ($ver) did not match" && exit 1) | ||
|
||
%install | ||
pushd ${RPM_BUILD_DIR}/src/compose-cli | ||
install -D -p -m 0755 bin/docker-compose ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-compose | ||
popd | ||
|
||
%files | ||
%{_libexecdir}/docker/cli-plugins/docker-compose | ||
|
||
%post | ||
|
||
%preun | ||
|
||
%postun | ||
|
||
%changelog |