-
Notifications
You must be signed in to change notification settings - Fork 73
/
Dockerfile.cosmovisor
58 lines (45 loc) · 2.14 KB
/
Dockerfile.cosmovisor
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
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive \
USERNAME=appuser \
APP_PATH=/data
#* curl jq - required for readyness probe and to download genesis
RUN apt update && \
apt -y dist-upgrade && \
apt install -y --no-install-recommends \
curl jq \
tzdata \
ca-certificates && \
echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && \
apt update && \
apt install -y --no-install-recommends -t testing \
zlib1g \
libgnutls30 \
perl-base && \
rm -rf /var/cache/apt/*
RUN groupadd -g 1001 ${USERNAME} && \
useradd -m -d ${APP_PATH} -u 1001 -g 1001 ${USERNAME}
#* Install dasel to work with json/yaml/toml configs
ENV DASEL_VERSION="v2.8.1"
ADD https://github.com/TomWright/dasel/releases/download/${DASEL_VERSION}/dasel_linux_amd64 /usr/local/bin/dasel
RUN chmod a+x /usr/local/bin/dasel
#* See https://docs.cosmos.network/main/build/tooling/cosmovisor#setup for details
ENV COSMOVISOR_VERSION="v1.5.0"
ENV INITIAL_COSMOVISOR_DIR="/cosmovisor"
ENV DAEMON_HOME="/data"
ENV DAEMON_NAME=allorad
ENV UNSAFE_SKIP_BACKUP=true
ADD https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor/${COSMOVISOR_VERSION}/cosmovisor-v1.5.0-linux-amd64.tar.gz /tmp/cosmovisor.tar.gz
RUN tar -xvf /tmp/cosmovisor.tar.gz -C /usr/local/bin/ && \
chmod +x /usr/local/bin/cosmovisor
ARG ALLORAD_CURRENT_VERSION="v0.5.0"
ARG ALLORAD_UPGRADE_VERSION="v0.6.0"
RUN mkdir -p ${INITIAL_COSMOVISOR_DIR}/genesis/bin && \
curl -Lo ${INITIAL_COSMOVISOR_DIR}/genesis/bin/allorad https://github.com/allora-network/allora-chain/releases/download/${ALLORAD_CURRENT_VERSION}/allorad_linux_amd64 && \
chmod +x ${INITIAL_COSMOVISOR_DIR}/genesis/bin/allorad
RUN mkdir -p ${INITIAL_COSMOVISOR_DIR}/upgrades/${ALLORAD_UPGRADE_VERSION}/bin && \
curl -Lo ${INITIAL_COSMOVISOR_DIR}/upgrades/${ALLORAD_UPGRADE_VERSION}/bin/allorad https://github.com/allora-network/allora-chain/releases/download/${ALLORAD_UPGRADE_VERSION}/allorad_linux_amd64
VOLUME ${APP_PATH}
WORKDIR ${APP_PATH}
USER ${USERNAME}
EXPOSE 26656/tcp 26657/tcp 26660/tcp 9090/tcp 1317/tcp
ENTRYPOINT ["cosmovisor"]