-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into v14-rebase
- Loading branch information
Showing
35 changed files
with
926 additions
and
1,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,53 @@ | ||
# Purpose: This Dockerfile creates an environment for running ZetaChain | ||
# It contains: | ||
# - zetacored: the ZetaChain node binary | ||
# - zetaclientd: the ZetaChain client binary for observers | ||
# - zetae2e: the ZetaChain end-to-end tests CLI | ||
|
||
FROM golang:1.20-alpine3.18 | ||
# Build Stage | ||
FROM golang:1.20-alpine3.18 AS builder | ||
|
||
ENV GOPATH /go | ||
ENV GOOS=linux | ||
ENV CGO_ENABLED=1 | ||
|
||
RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux | ||
RUN ssh-keygen -b 2048 -t rsa -f /root/.ssh/localtest.pem -q -N "" | ||
# Install build dependencies | ||
RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl python3 py3-pip | ||
|
||
# Set the working directory | ||
WORKDIR /go/delivery/zeta-node | ||
|
||
# Copy module files and download dependencies | ||
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN go mod download | ||
|
||
# Copy the rest of the source code and build the application | ||
COPY . . | ||
RUN make install | ||
RUN make install-zetae2e | ||
# | ||
#FROM golang:1.20-alpine | ||
|
||
#RUN apk --no-cache add openssh jq tmux vim curl bash | ||
RUN ssh-keygen -A | ||
WORKDIR /root | ||
RUN make install | ||
|
||
RUN cp /root/.ssh/localtest.pem.pub /root/.ssh/authorized_keys | ||
# Run Stage | ||
FROM alpine:3.18 | ||
|
||
RUN cp /go/bin/zetaclientd /usr/local/bin | ||
RUN cp /go/bin/zetacored /usr/local/bin | ||
RUN cp /go/bin/zetae2e /usr/local/bin | ||
# Copy Start Script Helpers | ||
COPY contrib/docker-scripts/* /scripts/ | ||
|
||
COPY contrib/localnet/scripts /root | ||
COPY contrib/localnet/preparams /root/preparams | ||
COPY contrib/localnet/ssh_config /root/.ssh/config | ||
COPY contrib/localnet/zetacored /root/zetacored | ||
COPY contrib/localnet/tss /root/tss | ||
# 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 && \ | ||
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 | ||
|
||
RUN chmod 755 /root/*.sh | ||
RUN chmod 700 /root/.ssh | ||
RUN chmod 600 /root/.ssh/* | ||
# Copy the binaries from the build stage | ||
COPY --from=builder /go/bin/zetaclientd /usr/local/bin/zetaclientd | ||
COPY --from=builder /go/bin/zetacored /usr/local/bin/zetacored | ||
|
||
# Set the working directory | ||
WORKDIR /usr/local/bin | ||
ENV SHELL /bin/sh | ||
EXPOSE 22 | ||
|
||
ENTRYPOINT ["/usr/sbin/sshd", "-D"] | ||
# Set the default shell | ||
ENV SHELL /bin/bash | ||
|
||
EXPOSE 26656 | ||
EXPOSE 1317 | ||
EXPOSE 8545 | ||
EXPOSE 8546 | ||
EXPOSE 9090 | ||
EXPOSE 26657 | ||
EXPOSE 9091 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
FROM golang:1.20-alpine3.18 | ||
|
||
ENV GOPATH /go | ||
ENV GOOS=linux | ||
ENV CGO_ENABLED=1 | ||
|
||
RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux python3 py3-pip | ||
RUN pip install requests | ||
RUN ssh-keygen -b 2048 -t rsa -f /root/.ssh/localtest.pem -q -N "" | ||
|
||
WORKDIR /go/delivery/zeta-node | ||
COPY go.mod . | ||
COPY go.sum . | ||
#RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
# go mod download | ||
RUN go mod download | ||
COPY . . | ||
|
||
#RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
# make install | ||
#RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
# make install-zetae2e | ||
RUN make install | ||
RUN make install-zetae2e | ||
# | ||
#FROM golang:1.20-alpine | ||
|
||
#RUN apk --no-cache add openssh jq tmux vim curl bash | ||
RUN ssh-keygen -A | ||
WORKDIR /root | ||
|
||
RUN cp /root/.ssh/localtest.pem.pub /root/.ssh/authorized_keys | ||
|
||
RUN cp /go/bin/zetaclientd /usr/local/bin | ||
RUN cp /go/bin/zetacored /usr/local/bin | ||
RUN cp /go/bin/zetae2e /usr/local/bin | ||
|
||
COPY contrib/localnet/scripts /root | ||
COPY contrib/localnet/preparams /root/preparams | ||
COPY contrib/localnet/ssh_config /root/.ssh/config | ||
COPY contrib/localnet/zetacored /root/zetacored | ||
COPY contrib/localnet/tss /root/tss | ||
|
||
RUN chmod 755 /root/*.sh | ||
RUN chmod 700 /root/.ssh | ||
RUN chmod 600 /root/.ssh/* | ||
|
||
WORKDIR /usr/local/bin | ||
ENV SHELL /bin/sh | ||
EXPOSE 22 | ||
|
||
ENTRYPOINT ["/usr/sbin/sshd", "-D"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version: '3.8' | ||
services: | ||
zetachain_mainnet_rpc: | ||
platform: linux/amd64 | ||
#This will build the binary from the GIT_REF you are locally on. | ||
# build: | ||
# context: ../../.. | ||
# dockerfile: Dockerfile | ||
image: zetachain/zetacored:${DOCKER_TAG:-ubuntu-v14} | ||
environment: | ||
DAEMON_HOME: "/root/.zetacored" | ||
NETWORK: athens3 | ||
#RESTORE_TYPE=snapshot/snapshot-archive/statesync | ||
RESTORE_TYPE: "statesync" | ||
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" | ||
DAEMON_RESTART_AFTER_UPGRADE: "true" | ||
UNSAFE_SKIP_BACKUP: "true" | ||
CLIENT_DAEMON_NAME: "zetaclientd" | ||
CLIENT_DAEMON_ARGS: "" | ||
CLIENT_SKIP_UPGRADE: "true" | ||
CLIENT_START_PROCESS: "false" | ||
MONIKER: local-test | ||
RE_DO_START_SEQUENCE: "false" | ||
ports: | ||
- "26656:26656" | ||
- "1317:1317" | ||
- "8545:8545" | ||
- "8546:8546" | ||
- "26657:26657" | ||
- "9090:9090" | ||
- "9091:9091" | ||
volumes: | ||
- zetacored_data:/root/.zetacored/ | ||
entrypoint: bash /scripts/start.sh | ||
|
||
volumes: | ||
zetacored_data: |
Oops, something went wrong.