-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile.cosmovisor-lite
45 lines (32 loc) · 1.52 KB
/
Dockerfile.cosmovisor-lite
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM ghcr.io/pundiai/fx-core:7.5.1 AS fxv7_5
FROM ghcr.io/pundiai/fx-core:8.0.0-rc0 AS fxv8
FROM ghcr.io/pundiai/fx-core:8.1.0-rc1 AS fxv8_1
FROM --platform=$BUILDPLATFORM alpine:3.19 AS downloader
ARG TARGETPLATFORM
RUN ARCH=$(echo "$TARGETPLATFORM" | cut -d'/' -f2) && \
wget -c https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.6.0/cosmovisor-v1.6.0-linux-$ARCH.tar.gz && \
tar -zxvf cosmovisor-v1.6.0-linux-$ARCH.tar.gz
FROM alpine:3.19
WORKDIR /root
ENV DAEMON_HOME=/root/.fxcore
ENV DAEMON_NAME=fxcored
ENV DAEMON_ALLOW_DOWNLOAD_BINARIES=false
ENV DAEMON_DOWNLOAD_MUST_HAVE_CHECKSUM=false
ENV DAEMON_RESTART_AFTER_UPGRADE=true
ENV DAEMON_RESTART_DELAY=1s
ENV DAEMON_POLL_INTERVAL=3s
ENV UNSAFE_SKIP_BACKUP=true
ENV DAEMON_PREUPGRADE_MAX_RETRIES=3
ENV COSMOVISOR_DISABLE_LOGS=false
ENV COSMOVISOR_COLOR_LOGS=true
ENV PATH="/root/.fxcore/cosmovisor/current/bin:${PATH}"
COPY --from=fxv7_5 /usr/bin/fxcored /root/.fxcore/cosmovisor/genesis/bin/fxcored
RUN mkdir -p /root/.fxcore/cosmovisor/upgrades/v7.5.x/bin && \
ln -s /usr/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v7.5.x/bin/fxcored
COPY --from=fxv8 /usr/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v8.0.x/bin/fxcored
COPY --from=fxv8_1 /usr/bin/fxcored /root/.fxcore/cosmovisor/upgrades/v8.1.x/bin/fxcored
COPY --from=downloader /cosmovisor /usr/bin/cosmovisor
RUN cosmovisor init /root/.fxcore/cosmovisor/genesis/bin/fxcored
EXPOSE 26656/tcp 26657/tcp 26660/tcp 9090/tcp 1317/tcp 8545/tcp 8546/tcp
VOLUME ["/root"]
ENTRYPOINT ["cosmovisor", "run"]