|
|
@@ -4,6 +4,7 @@ WORKDIR /app
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
curl \
|
|
|
+ jq \
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
# 检测系统架构并下载对应的二进制文件
|
|
|
@@ -24,11 +25,9 @@ RUN ARCH=$(uname -m) && \
|
|
|
echo "Unsupported architecture: $ARCH" && exit 1; \
|
|
|
fi && \
|
|
|
echo "Downloading $BINARY_NAME for architecture $ARCH" && \
|
|
|
- curl -s https://api.github.com/repos/nexus-xyz/nexus-cli/releases/latest | \
|
|
|
- grep "browser_download_url" | \
|
|
|
- grep "$BINARY_NAME\"" | \
|
|
|
- cut -d '"' -f 4 | \
|
|
|
- xargs -I {} curl -L -o nexus-network {} && \
|
|
|
+ DOWNLOAD_URL=$(curl -s https://api.github.com/repos/nexus-xyz/nexus-cli/releases/latest | \
|
|
|
+ jq -r ".assets[] | select(.name == \"$BINARY_NAME\") | .browser_download_url") && \
|
|
|
+ curl -L -o nexus-network "$DOWNLOAD_URL" && \
|
|
|
chmod +x nexus-network
|
|
|
|
|
|
COPY entrypoint.sh entrypoint.sh
|