-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile.testnet
65 lines (48 loc) · 2.01 KB
/
Dockerfile.testnet
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
59
60
61
62
63
64
65
ARG build_image=golang:1.17.13-bullseye
FROM $build_image as kava-rosetta-build
RUN apt-get update \
&& apt-get install -y git make gcc \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app
WORKDIR /app
ARG cosmovisor_version=v1.1.0
ENV COSMOVISOR_VERSION=$cosmovisor_version
RUN git clone https://github.com/cosmos/cosmos-sdk \
&& cd cosmos-sdk \
&& git checkout cosmovisor/$COSMOVISOR_VERSION \
&& make cosmovisor \
&& mv /app/cosmos-sdk/cosmovisor/cosmovisor /go/bin
ARG kava_genesis_version=v0.17.5
ENV KAVA_GENESIS_VERSION=$kava_genesis_version
RUN git clone https://github.com/kava-labs/kava \
&& cd kava \
&& git checkout $KAVA_GENESIS_VERSION \
&& make install \
&& mkdir -p /app/cosmovisor/genesis/bin \
&& mv /go/bin/kava /app/cosmovisor/genesis/bin
ARG kava_rosetta_version=v2.0.0
ENV KAVA_ROSETTA_VERSION=$kava_rosetta_version
RUN git clone https://github.com/Kava-Labs/rosetta-kava.git \
&& cd rosetta-kava \
&& git checkout $KAVA_ROSETTA_VERSION \
&& make install
FROM ubuntu:22.04
RUN apt-get update \
&& apt-get install -y supervisor curl \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app \
&& mkdir /app/bin
WORKDIR /app
ENV PATH=$PATH:/app/bin
# copy build binaries from build environment
COPY --from=kava-rosetta-build /app/cosmovisor /app/cosmovisor
COPY --from=kava-rosetta-build /go/bin/cosmovisor /app/bin/cosmovisor
COPY --from=kava-rosetta-build /go/bin/rosetta-kava /app/bin/rosetta-kava
# copy config templates to automate setup
COPY --from=kava-rosetta-build /app/rosetta-kava/examples /app/templates
# copy scripts to run services
COPY --from=kava-rosetta-build /app/rosetta-kava/conf/start-services.sh /app/bin/start-services.sh
COPY --from=kava-rosetta-build /app/rosetta-kava/conf/kill-supervisord.sh /app/bin/kill-supervisord.sh
COPY --from=kava-rosetta-build /app/rosetta-kava/conf/supervisord.conf /etc/supervisor/conf.d/rosetta-kava.conf
ENV KAVA_RPC_URL=http://localhost:26657
CMD ["/app/bin/start-services.sh"]