Skip to content

Commit

Permalink
tools: install oras from source on ppc64le
Browse files Browse the repository at this point in the history
Since the release is not yet out for ppc64le, build oras from source and use it.

Fixes: kata-containers#8458

Signed-off-by: Amulyam24 <[email protected]>
  • Loading branch information
Amulyam24 committed Nov 16, 2023
1 parent df0d53f commit e37ab14
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
make \
git \
wget \
sudo && \
apt-get clean && rm -rf /var/lib/apt/lists/ && \
install_yq.sh && \
Expand Down Expand Up @@ -43,10 +46,7 @@ RUN apt-get update && \
build-essential \
cpio \
gcc \
git \
make \
unzip \
wget \
xz-utils && \
apt-get clean && rm -rf /var/lib/apt/lists

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,21 @@ fi

arch=$(uname -m)
if [ "${arch}" = "ppc64le" ]; then
echo "An ORAS release for ppc64le is not available yet."
exit 0
fi
echo "Building oras from source"
go_version="go1.21.3"
# Install go
wget https://go.dev/dl/${go_version}.linux-ppc64le.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf ${go_version}.linux-ppc64le.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version

git clone https://github.com/oras-project/oras.git
pushd oras
make build-linux-ppc64le
cp bin/linux/ppc64le/oras ${install_dest}
popd
exit 0
fi
if [ "${arch}" = "x86_64" ]; then
arch="amd64"
fi
Expand Down

0 comments on commit e37ab14

Please sign in to comment.