Skip to content

Commit

Permalink
Add alpine support in install-native-deps script (#98603)
Browse files Browse the repository at this point in the history
Similar to debian-based distros, make it convenient for someone trying
to use slim alpine image for non-x64 architectures (without
cross-compilation). e.g. for arm64:
```sh
$ docker run --rm -v$(pwd):/runtime -w /runtime \
    --platform linux/arm64 -it alpine \
    sh -c 'eng/install-native-dependencies.sh && ./build.sh'
```
  • Loading branch information
am11 committed Feb 19, 2024
1 parent 85679d2 commit 03c9d36
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions eng/install-native-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@ case "$os" in
. /etc/os-release
fi

if [ "$ID" != "debian" ] && [ "$ID_LIKE" != "debian" ]; then
if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
apt update

apt install -y build-essential gettext locales cmake llvm clang lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \
libssl-dev libkrb5-dev zlib1g-dev

localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
elif [ "$ID" = "alpine" ]; then
apk add build-base cmake bash curl clang llvm-dev krb5-dev lttng-ust-dev icu-dev zlib-dev openssl-dev
else
echo "Unsupported distro. distro: $ID"
exit 1
fi

apt update

apt install -y build-essential gettext locales cmake llvm clang lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \
libssl-dev libkrb5-dev zlib1g-dev

localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
;;

osx|maccatalyst|ios|iossimulator|tvos|tvossimulator)
Expand Down

0 comments on commit 03c9d36

Please sign in to comment.