Skip to content

Commit

Permalink
updated docker file to have some more dependencies by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gzukel committed Mar 8, 2024
1 parent ea7b837 commit ddb7fc6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 25 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions contrib/athens3/zetacored/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 0 additions & 18 deletions contrib/docker-scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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

Expand All @@ -294,9 +279,6 @@ else
logt "Download Configs"
download_configs

logt "Download Cosmovisor"
download_cosmovisor

logt "Download Historical Binaries"
download_binary_version

Expand Down
2 changes: 0 additions & 2 deletions contrib/mainnet/zetacored/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ddb7fc6

Please sign in to comment.