-
Notifications
You must be signed in to change notification settings - Fork 73
/
Dockerfile.development
64 lines (50 loc) · 1.71 KB
/
Dockerfile.development
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
FROM golang:1.22-bookworm AS builder
ENV GO111MODULE=on
ENV GOMODCACHE=/gocache
ADD . /src
WORKDIR /src
COPY go.mod .
COPY go.sum .
RUN mkdir -p $GOMODCACHE
RUN --mount=type=cache,target=/gocache go mod download
RUN --mount=type=cache,target=/gocache \
--mount=type=cache,target=/root/.cache/go-build \
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]
RUN --mount=type=cache,target=/gocache \
--mount=type=cache,target=/root/.cache/go-build \
make install
#==============================================================
FROM debian:bookworm-slim as execution
ENV DEBIAN_FRONTEND=noninteractive \
USERNAME=appuser \
APP_PATH=/data
#* curl jq - required for readyness probe and to download genesis
#* bc - required for generate_genesis.sh
RUN apt update && \
apt -y dist-upgrade && \
apt install -y --no-install-recommends \
curl jq \
tzdata \
bc \
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/*
#* 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
COPY --from=builder /go/bin/* /usr/local/bin/
RUN groupadd -g 1001 ${USERNAME} \
&& useradd -m -d ${APP_PATH} -u 1001 -g 1001 ${USERNAME}
EXPOSE 1317 26656 26657
VOLUME ${APP_PATH}
WORKDIR ${APP_PATH}
USER ${USERNAME}
ENV DAEMON_NAME="allorad"
ENV DAEMON_HOME="/data"
ENTRYPOINT ["cosmovisor" "run" "start"]