From fcd10bbf693b5953218a011d7353f2db58aea2ba Mon Sep 17 00:00:00 2001 From: Tom Beynon Date: Tue, 26 Sep 2023 20:25:23 +0200 Subject: [PATCH] Build Akash from binary ZIP archive --- Dockerfile | 15 +++++++++++++++ akash/build.yml | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3265e17f..7ffd97dec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -98,6 +98,21 @@ ARG BINARY_URL RUN curl -Lo /bin/$PROJECT_BIN $BINARY_URL RUN chmod +x /bin/$PROJECT_BIN +# +# Optional image to install from binary zip +# +FROM build_base AS binary_zip + +ARG BINARY_URL +ARG BINARY_ZIP_PATH + +RUN curl -Lo /bin/$PROJECT_BIN.zip $BINARY_URL +RUN unzip /bin/$PROJECT_BIN.zip -d /bin && rm /bin/$PROJECT_BIN.zip +RUN if [ -n "$BINARY_ZIP_PATH" ]; then \ + mv /bin/${BINARY_ZIP_PATH} /bin; \ + fi +RUN chmod +x /bin/$PROJECT_BIN + # # Custom image for injective # diff --git a/akash/build.yml b/akash/build.yml index 6da3319da..24d0a39c2 100644 --- a/akash/build.yml +++ b/akash/build.yml @@ -8,9 +8,8 @@ services: PROJECT: akash VERSION: v0.26.1 REPOSITORY: https://github.com/akash-network/node - GOLANG_VERSION: 1.21-bullseye - DEBIAN_VERSION: bullseye - INSTALL_PACKAGES: jq + BUILD_IMAGE: binary_zip + BINARY_URL: https://github.com/akash-network/node/releases/download/v0.26.1/akash_linux_amd64.zip?checksum=sha256:5a2b406e1df0144ef23a184837c5f6bf5e704271ecb94f94d7f705a4f90f2580 ports: - '26656:26656' - '26657:26657'