aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYibo Cai <yibo.cai@arm.com>2017-11-08 11:31:47 +0800
committerYibo Cai <yibo.cai@arm.com>2017-11-09 15:29:13 +0800
commite1a04c52190da834a68aa2fbb3777773b658b261 (patch)
tree67c3490ab64f306728044b0db73248fcf5bd8bff
parent805cbb914fa5927b4b04ea124870c66ecbcba6cc (diff)
build: add docker-ce apt repo for aarch64
Change-Id: I5b3c30e6202c4db45d02221d3e4b7e7250b1fd01 Signed-off-by: Yibo Cai <yibo.cai@arm.com>
-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