summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-11-17 08:53:44 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-17 08:53:44 +0000
commit9c15a3763f01c60879b0ce49094952f2fb941add (patch)
tree21e6198c855a03289153762d64a28d1c58dfa3cd
parentc0fb7bb71a92988f4c1504690cb9c3ee1870378b (diff)
parente1a04c52190da834a68aa2fbb3777773b658b261 (diff)
Merge "build: add docker-ce apt repo for aarch64"
-rwxr-xr-xbuild.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 4fd0d19b..103bbb8f 100755
--- a/build.sh
+++ b/build.sh
@@ -13,6 +13,8 @@ COMPASS_PATH=`cd ${BASH_SOURCE[0]%/*};pwd`
WORK_DIR=$COMPASS_PATH/work/building
export CACHE_DIR=$WORK_DIR/cache
+COMPASS_ARCH=$(uname -m)
+
echo $COMPASS_PATH
REDHAT_REL=${REDHAT_REL:-"false"}
@@ -23,12 +25,17 @@ mkdir -p $WORK_DIR $CACHE_DIR
function install_docker_ubuntu()
{
+ REPO_ARCH=amd64
+ if [ "$COMPASS_ARCH" = "aarch64" ]; then
+ REPO_ARCH=arm64
+ fi
+
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y apt-transport-https ca-certificates curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
+ sudo add-apt-repository "deb [arch=$REPO_ARCH] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update