-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.genesis
53 lines (41 loc) · 1.33 KB
/
Dockerfile.genesis
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
ARG VERSION=testversion
ARG ENV=testenv
# Build the sequencer binary
FROM golang:1.21-alpine3.18 as current
LABEL stage=sequencer-builder
RUN apk add --update make build-base curl git upx
RUN go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
WORKDIR /app
COPY .gopath~ .gopath~
COPY Makefile .
COPY go.mod .
COPY go.sum .
COPY api api
COPY app app
COPY crypto crypto
COPY docs docs
COPY tools tools
COPY x x
COPY cmd cmd
COPY testutil testutil
COPY .git .git
RUN make build-optimized
# Minimal output image
FROM alpine:3.18
ARG VERSION=testversion
ARG ENV=testenv
RUN apk add --update jq
# Cosmovisor setup
RUN mkdir -p /root/cosmovisor/genesis/bin
# Cosmos setup
RUN mkdir -p /root/.sequencer/data
RUN echo '{"height":"0","round":0,"step":0}' > /root/.sequencer/data/priv_validator_state.json
# Genesis setup
COPY network/${ENV}/genesis/prev_sort_keys.json /root/.sequencer/genesis/prev_sort_keys.json
COPY network/${ENV}/genesis/arweave_block.json /root/.sequencer/genesis/arweave_block.json
# Executables
COPY --from=current /go/bin/cosmovisor /usr/local/bin/cosmovisor
COPY --from=current /app/bin/sequencer /root/.sequencer/cosmovisor/genesis/bin/sequencer
COPY utils/preupgrade.sh /root/.sequencer/cosmovisor/preupgrade.sh
COPY utils/docker-entrypoint.sh /app/docker-entrypoint.sh
ENTRYPOINT [ "/app/docker-entrypoint.sh" ]