Browse Source

Use docker for arm64 on arm64

master
nicolas.dorier 5 years ago
parent
commit
3c6c7498e8
No known key found for this signature in database GPG Key ID: 6618763EF09186FE
  1. 19
      btcpay-setup.sh

19
btcpay-setup.sh

@ -384,7 +384,7 @@ if ! [[ -x "$(command -v docker)" ]] || ! [[ -x "$(command -v docker-compose)" ]
2>error
fi
if ! [[ -x "$(command -v docker)" ]]; then
if [[ "$(uname -m)" == "x86_64" ]] || [[ "$(uname -m)" == "armv7l" ]]; then
if [[ "$(uname -m)" == "x86_64" ]] || [[ "$(uname -m)" == "armv7l" ]] || [[ "$(uname -m)" == "aarch64" ]]; then
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
if ! [[ -x "$(command -v brew)" ]]; then
@ -408,20 +408,9 @@ if ! [[ -x "$(command -v docker)" ]] || ! [[ -x "$(command -v docker-compose)" ]
sh get-docker.sh
rm get-docker.sh
fi
elif [[ "$(uname -m)" == "aarch64" ]]; then
echo "Trying to install docker for armv7 on a aarch64 board..."
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RELEASE=$(lsb_release -cs)
if [[ "$RELEASE" == "bionic" ]]; then
RELEASE=xenial
fi
if [[ -x "$(command -v dpkg)" ]]; then
dpkg --add-architecture armhf
fi
add-apt-repository "deb https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $RELEASE stable"
apt-get update -y
# zlib1g:armhf is needed for docker-compose, but we install it here as we changed dpkg here
apt-get install -y docker-ce:armhf zlib1g:armhf
else
echo "Unsupported architecture $(uname -m)"
return
fi
fi

Loading…
Cancel
Save