Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #638 from thaJeztah/20.10_backport_add_compose_cli…
…_package [20.10 backport] add docker-compose-plugin package (deb, rpm)
- Loading branch information
Showing
8 changed files
with
138 additions
and
9 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
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
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
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,62 @@ | ||
%global debug_package %{nil} | ||
|
||
Name: docker-compose-plugin | ||
Version: %{_compose_rpm_version} | ||
Release: %{_release}%{?dist} | ||
Epoch: 0 | ||
Source0: compose.tgz | ||
Summary: Docker Compose (V2) plugin for the Docker CLI | ||
Group: Tools/Docker | ||
License: ASL 2.0 | ||
URL: https://github.com/docker/compose/ | ||
Vendor: Docker | ||
Packager: Docker <support@docker.com> | ||
|
||
BuildRequires: bash | ||
|
||
%description | ||
Docker Compose (V2) plugin for the Docker CLI. | ||
|
||
This plugin provides the 'docker compose' subcommand. | ||
|
||
The binary can also be run standalone as a direct replacement for | ||
Docker Compose V1 ('docker-compose'). | ||
|
||
%prep | ||
%setup -q -c -n src -a 0 | ||
|
||
%build | ||
pushd ${RPM_BUILD_DIR}/src/compose | ||
# 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 | ||
install -D -p -m 0755 bin/docker-compose ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-compose | ||
popd | ||
|
||
for f in LICENSE MAINTAINERS NOTICE README.md; do | ||
install -D -p -m 0644 "${RPM_BUILD_DIR}/src/compose/$f" "docker-compose-plugin-docs/$f" | ||
done | ||
|
||
%files | ||
%doc docker-compose-plugin-docs/* | ||
%license docker-compose-plugin-docs/LICENSE | ||
%license docker-compose-plugin-docs/NOTICE | ||
%{_libexecdir}/docker/cli-plugins/docker-compose | ||
|
||
%post | ||
|
||
%preun | ||
|
||
%postun | ||
|
||
%changelog |