forked from chiliz-chain/v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (16 loc) · 708 Bytes
/
Dockerfile
File metadata and controls
23 lines (16 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Build Geth in a stock Go builder container
FROM golang:1.25.5-alpine AS builder
RUN apk add --no-cache make cmake gcc musl-dev linux-headers git bash build-base libc-dev libstdc++
COPY go.mod /go-ethereum/
COPY go.sum /go-ethereum/
RUN cd /go-ethereum && go mod download
ADD . /go-ethereum
ENV CGO_CFLAGS="-O -D__BLST_PORTABLE__"
ENV CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__"
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
# Pull Geth into a second stage deploy alpine container
FROM alpine:latest
RUN apk add --no-cache ca-certificates curl jq tini
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
EXPOSE 6060 8545 8546 8547 30303 30303/udp
ENTRYPOINT ["geth"]