diff --git a/Dockerfile b/Dockerfile index dc68ba89c1..404ae10917 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,15 +24,23 @@ RUN make install # Run Stage FROM alpine:3.18 +ENV COSMOVISOR_CHECKSUM="626dfc58c266b85f84a7ed8e2fe0e2346c15be98cfb9f9b88576ba899ed78cdc" +ENV COSMOVISOR_VERSION="v1.5.0" # Copy Start Script Helpers COPY contrib/docker-scripts/* /scripts/ # Install runtime dependencies -RUN apk --no-cache add git jq bash curl python3 libusb-dev linux-headers make build-base wget py3-pip qemu-img qemu-system-x86_64 && \ - pip install requests && \ +RUN apk --no-cache add git jq bash curl nano vim tmux python3 libusb-dev linux-headers make build-base dnsutils psmisc coreutils wget py3-pip qemu-img qemu-system-x86_64 && \ + pip install requests shutil && \ chmod a+x -R /scripts && \ wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.31-r0/glibc-2.31-r0.apk && \ - apk add --force-overwrite --allow-untrusted glibc-2.31-r0.apk + apk add --force-overwrite --allow-untrusted glibc-2.31-r0.apk && \ + curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz && \ + mkdir -p /usr/local/gcloud && \ + tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz && \ + /usr/local/gcloud/google-cloud-sdk/install.sh --quiet && \ + ln -s /usr/local/gcloud/google-cloud-sdk/bin/gcloud /usr/bin/gcloud && \ + python /scripts/install_cosmovisor.py # Copy the binaries from the build stage COPY --from=builder /go/bin/zetaclientd /usr/local/bin/zetaclientd diff --git a/contrib/athens3/zetacored/docker-compose.yml b/contrib/athens3/zetacored/docker-compose.yml index 60729e6a53..0332b9482b 100644 --- a/contrib/athens3/zetacored/docker-compose.yml +++ b/contrib/athens3/zetacored/docker-compose.yml @@ -14,9 +14,7 @@ services: RESTORE_TYPE: "snapshot" SNAPSHOT_API: https://snapshots.zetachain.com TRUST_HEIGHT_DIFFERENCE_STATE_SYNC: 40000 - COSMOVISOR_VERSION: "v1.5.0" CHAIN_ID: "athens_7001-1" - COSMOVISOR_CHECKSUM: "626dfc58c266b85f84a7ed8e2fe0e2346c15be98cfb9f9b88576ba899ed78cdc" VISOR_NAME: "cosmovisor" DAEMON_NAME: "zetacored" DAEMON_ALLOW_DOWNLOAD_BINARIES: "false" diff --git a/contrib/docker-scripts/start.sh b/contrib/docker-scripts/start.sh index cca2376184..db50ddce44 100644 --- a/contrib/docker-scripts/start.sh +++ b/contrib/docker-scripts/start.sh @@ -163,18 +163,6 @@ function setup_basic_keyring { fi } -function install_dependencies { - apt-get update - apt-get install nano jq python3 -y - pip3 install requests -} - -function download_cosmovisor { - mkdir -p ${DAEMON_HOME}/cosmovisor/ - mkdir -p ${DAEMON_HOME}/cosmovisor/upgrades/ - python3 /scripts/install_cosmovisor.py -} - function download_binary_version { if [ "${NETWORK}" == "mainnet" ]; then wget -q ${BINARY_LIST_MAINNET} @@ -269,9 +257,6 @@ if [[ -f "${DAEMON_HOME}/start_sequence_status" ]] && grep -q "START_SEQUENCE_CO logt "Modify Chain Configs" change_config_values - logt "Download Cosmosvisor." - download_cosmovisor - logt "Move Zetacored Binaries." move_zetacored_binaries @@ -294,9 +279,6 @@ else logt "Download Configs" download_configs - logt "Download Cosmovisor" - download_cosmovisor - logt "Download Historical Binaries" download_binary_version diff --git a/contrib/mainnet/zetacored/docker-compose.yml b/contrib/mainnet/zetacored/docker-compose.yml index 1614d4d0e8..d5fde8deda 100644 --- a/contrib/mainnet/zetacored/docker-compose.yml +++ b/contrib/mainnet/zetacored/docker-compose.yml @@ -15,9 +15,7 @@ services: RESTORE_TYPE: "snapshot" SNAPSHOT_API: https://snapshots.zetachain.com TRUST_HEIGHT_DIFFERENCE_STATE_SYNC: 40000 - COSMOVISOR_VERSION: "v1.5.0" CHAIN_ID: "zetachain_7000-1" - COSMOVISOR_CHECKSUM: "626dfc58c266b85f84a7ed8e2fe0e2346c15be98cfb9f9b88576ba899ed78cdc" VISOR_NAME: "cosmovisor" DAEMON_NAME: "zetacored" DAEMON_ALLOW_DOWNLOAD_BINARIES: "false"