From b3221647b31f72bcab074689c00a974efc7a5afc Mon Sep 17 00:00:00 2001 From: "ryan.kuba" Date: Thu, 26 May 2022 11:45:20 -0400 Subject: [PATCH] KASM-2688 install latest compose pulin in dind images --- src/ubuntu/install/dind/install_dind.sh | 5 ++++- src/ubuntu/install/dind_rootless/install_dind_rootless.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ubuntu/install/dind/install_dind.sh b/src/ubuntu/install/dind/install_dind.sh index 79116f5..2b2363a 100644 --- a/src/ubuntu/install/dind/install_dind.sh +++ b/src/ubuntu/install/dind/install_dind.sh @@ -44,7 +44,10 @@ docker --version echo "Installing Docker Compose" mkdir -p /usr/local/lib/docker/cli-plugins -curl -L https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/lib/docker/cli-plugins/docker-compose +COMPOSE_RELEASE=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); +COMPOSE_OS=$(uname -s) +curl -L https://github.com/docker/compose/releases/download/${COMPOSE_RELEASE}/docker-compose-${COMPOSE_OS,,}-$(uname -m) -o /usr/local/lib/docker/cli-plugins/docker-compose chmod +x /usr/local/lib/docker/cli-plugins/docker-compose echo 'kasm-user:kasm-user' | chpasswd diff --git a/src/ubuntu/install/dind_rootless/install_dind_rootless.sh b/src/ubuntu/install/dind_rootless/install_dind_rootless.sh index def4378..0615a94 100644 --- a/src/ubuntu/install/dind_rootless/install_dind_rootless.sh +++ b/src/ubuntu/install/dind_rootless/install_dind_rootless.sh @@ -42,5 +42,8 @@ docker --version echo "Installing Docker Compose" mkdir -p /usr/local/lib/docker/cli-plugins -curl -L https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/lib/docker/cli-plugins/docker-compose +COMPOSE_RELEASE=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); +COMPOSE_OS=$(uname -s) +curl -L https://github.com/docker/compose/releases/download/${COMPOSE_RELEASE}/docker-compose-${COMPOSE_OS,,}-$(uname -m) -o /usr/local/lib/docker/cli-plugins/docker-compose chmod +x /usr/local/lib/docker/cli-plugins/docker-compose