Skip to content

Commit 255e87e

Browse files
jimisjujokini
authored andcommitted
Docker installation: do not depend on external repositories
Also updated the docker-compose binary to the latest one. Task-number: QTQAINFRA-3279 Change-Id: Ie09a772ca8247aa5f5bd6d36774b68b6bb846386 Reviewed-by: Tony Sarajärvi <[email protected]> (cherry picked from commit a270bcd) Reviewed-by: Heikki Halmet <[email protected]>
1 parent 74195b1 commit 255e87e

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

coin/provisioning/common/linux/docker.sh

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,37 @@
3535

3636
set -ex
3737

38-
# Download and install the docker engine.
39-
sudo apt-get install curl -y
40-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
41-
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
42-
sudo apt-get update
43-
sudo apt-get install docker-ce -y
38+
39+
. $(dirname "$0")/../../common/unix/DownloadURL.sh
40+
41+
42+
localRepo=http://ci-files01-hki.intra.qt.io/input/docker
43+
upstreamRepo=https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64
44+
45+
echo '
46+
f4c941807310e3fa470dddfb068d599174a3daec containerd.io_1.2.10-3_amd64.deb
47+
ee640d9258fd4d3f4c7017ab2a71da63cbbead55 docker-ce_19.03.4~3-0~ubuntu-bionic_amd64.deb
48+
09402bf5dac40f0c50f1071b17f38f6584a42ad1 docker-ce-cli_19.03.4~3-0~ubuntu-bionic_amd64.deb
49+
' \
50+
| xargs -n2 | while read sha f
51+
do
52+
DownloadURL $localRepo/$f $upstreamRepo/$f $sha
53+
done
54+
55+
sudo apt-get -y install ./containerd.io*.deb ./docker-ce*.deb ./docker-ce-cli*.deb
56+
rm -f ./containerd.io*.deb ./docker-ce*.deb ./docker-ce-cli*.deb
57+
4458
sudo usermod -a -G docker $USER
4559
sudo docker info
4660

47-
# Download and install the docker-compose extension.
48-
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
49-
sudo chmod +x /usr/local/bin/docker-compose
61+
# Download and install the docker-compose extension from https://github.com/docker/compose/releases
62+
f=docker-compose-$(uname -s)-$(uname -m)
63+
DownloadURL \
64+
$localRepo/$f \
65+
https://github.com/docker/compose/releases/download/1.24.1/$f \
66+
cfb3439956216b1248308141f7193776fcf4b9c9b49cbbe2fb07885678e2bb8a
67+
sudo install -m 755 ./docker-compose* /usr/local/bin/docker-compose
68+
rm ./docker-compose*
5069

5170
# Start testserver provisioning
5271
source "${BASH_SOURCE%/*}/testserver/docker_testserver.sh"

0 commit comments

Comments
 (0)