From 255e87ea249a503ee7136e34d9845a0d2c59447e Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Tue, 5 Nov 2019 12:45:45 +0100 Subject: Docker installation: do not depend on external repositories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also updated the docker-compose binary to the latest one. Task-number: QTQAINFRA-3279 Change-Id: Ie09a772ca8247aa5f5bd6d36774b68b6bb846386 Reviewed-by: Tony Sarajärvi (cherry picked from commit a270bcdb6beb34d7590378899805391cfcfe7091) Reviewed-by: Heikki Halmet --- coin/provisioning/common/linux/docker.sh | 37 ++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'coin') diff --git a/coin/provisioning/common/linux/docker.sh b/coin/provisioning/common/linux/docker.sh index 16af0a0a..466cb7b8 100755 --- a/coin/provisioning/common/linux/docker.sh +++ b/coin/provisioning/common/linux/docker.sh @@ -35,18 +35,37 @@ set -ex -# Download and install the docker engine. -sudo apt-get install curl -y -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -sudo apt-get update -sudo apt-get install docker-ce -y + +. $(dirname "$0")/../../common/unix/DownloadURL.sh + + +localRepo=http://ci-files01-hki.intra.qt.io/input/docker +upstreamRepo=https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64 + +echo ' + f4c941807310e3fa470dddfb068d599174a3daec containerd.io_1.2.10-3_amd64.deb + ee640d9258fd4d3f4c7017ab2a71da63cbbead55 docker-ce_19.03.4~3-0~ubuntu-bionic_amd64.deb + 09402bf5dac40f0c50f1071b17f38f6584a42ad1 docker-ce-cli_19.03.4~3-0~ubuntu-bionic_amd64.deb +' \ + | xargs -n2 | while read sha f +do + DownloadURL $localRepo/$f $upstreamRepo/$f $sha +done + +sudo apt-get -y install ./containerd.io*.deb ./docker-ce*.deb ./docker-ce-cli*.deb +rm -f ./containerd.io*.deb ./docker-ce*.deb ./docker-ce-cli*.deb + sudo usermod -a -G docker $USER sudo docker info -# Download and install the docker-compose extension. -sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose -sudo chmod +x /usr/local/bin/docker-compose +# Download and install the docker-compose extension from https://github.com/docker/compose/releases +f=docker-compose-$(uname -s)-$(uname -m) +DownloadURL \ + $localRepo/$f \ + https://github.com/docker/compose/releases/download/1.24.1/$f \ + cfb3439956216b1248308141f7193776fcf4b9c9b49cbbe2fb07885678e2bb8a +sudo install -m 755 ./docker-compose* /usr/local/bin/docker-compose +rm ./docker-compose* # Start testserver provisioning source "${BASH_SOURCE%/*}/testserver/docker_testserver.sh" -- cgit v1.2.3