forked from evmos/evmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (21 loc) · 981 Bytes
/
Dockerfile
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
FROM golang:1.20.5-alpine3.18 AS build-env
WORKDIR /go/src/github.com/evmos/evmos
COPY go.mod go.sum ./
RUN set -eux; apk add --no-cache ca-certificates=20230506-r0 build-base=0.5-r3 git=2.40.1-r0 linux-headers=6.3-r0
RUN --mount=type=bind,target=. --mount=type=secret,id=GITHUB_TOKEN \
git config --global url."https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/".insteadOf "https://github.com/"; \
go mod download
COPY . .
RUN make build
RUN go install github.com/MinseokOh/toml-cli@latest
FROM alpine:3.18
WORKDIR /root
COPY --from=build-env /go/src/github.com/evmos/evmos/build/evmosd /usr/bin/evmosd
COPY --from=build-env /go/bin/toml-cli /usr/bin/toml-cli
RUN apk add --no-cache ca-certificates=20230506-r0 jq=1.6-r3 curl=8.1.2-r0 bash=5.2.15-r5 vim=9.0.1568-r0 lz4=1.9.4-r4 \
&& addgroup -g 1000 evmos \
&& adduser -S -h /home/evmos -D evmos -u 1000 -G evmos
USER 1000
WORKDIR /home/evmos
EXPOSE 26656 26657 1317 9090 8545 8546
CMD ["evmosd"]