forked from zeta-chain/node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-release
40 lines (27 loc) · 892 Bytes
/
Dockerfile-release
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
FROM golang:1.20-alpine3.18 as builder
ENV GOPATH /go
ENV GOOS=linux
ENV CGO_ENABLED=1
WORKDIR /go/delivery/zeta-node
RUN apk update && \
apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux
COPY go.mod .
COPY go.sum .
RUN --mount=type=cache,target=/root/.cache/go-build \
go mod download
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
make install
RUN cp /go/bin/zetaclientd /usr/local/bin
RUN cp /go/bin/zetacored /usr/local/bin
RUN cp /go/bin/smoketest /usr/local/bin
#BUILD MAIN BINARY IMAGE
FROM golang:1.20-alpine
RUN apk --no-cache add jq bash curl wget nano tmux
COPY --chmod=765 --from=builder /usr/local/bin/zetaclientd /usr/local/bin/zetaclientd
COPY --chmod=765 --from=builder /usr/local/bin/zetacored /usr/local/bin/zetacored
WORKDIR /root/zetachain/
EXPOSE 26657
EXPOSE 26656
EXPOSE 1317
EXPOSE 9090