Fix platofrm specific docker-compose download

This commit is contained in:
Stéphane Busso
2021-01-18 10:00:37 +13:00
parent 6e01017026
commit 0c0bda1361
2 changed files with 7 additions and 5 deletions
+4 -3
View File
@@ -4,11 +4,12 @@ PLATFORM=$1
ARCH=$2
DOCKER_COMPOSE_VERSION=$3
if [ "${PLATFORM}" == 'win' ]; then
wget -O "dist/docker-compose.exe" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Windows-x86_64.exe"
elif [ "${PLATFORM}" == 'linux' ] && [ "${ARCH}" == 'amd64' ]; then
if [ "${PLATFORM}" == 'linux' ] && [ "${ARCH}" == 'amd64' ]; then
wget -O "dist/docker-compose" "https://github.com/portainer/docker-compose-linux-amd64-static-binary/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose"
chmod +x "dist/docker-compose"
elif [ "${PLATFORM}" == 'mac' ]; then
wget -O "dist/docker-compose" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Darwin-x86_64"
chmod +x "dist/docker-compose"
fi
exit 0
+3 -2
View File
@@ -218,13 +218,14 @@ function shell_download_docker_compose_binary(p, a) {
if (p === 'linux' || p === 'mac') {
return [
'if [ -f dist/docker ]; then',
'if [ -f dist/docker-compose ]; then',
'echo "Docker Compose binary exists";',
'else',
'build/download_docker_compose_binary.sh ' + ip + ' ' + ia + ' ' + binaryVersion + ';',
'fi',
].join(' ');
} else {
}
if (p === 'win') {
return [
'powershell -Command "& {if (Test-Path -Path "dist/docker-compose.exe") {',
'Write-Host "Skipping download, Docker Compose binary exists"',