-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile.debug
More file actions
27 lines (20 loc) · 951 Bytes
/
Dockerfile.debug
File metadata and controls
27 lines (20 loc) · 951 Bytes
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
# Build Geth in a stock Go builder container
FROM golang:1.25.5-alpine AS builder
WORKDIR /go-ethereum
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 go mod download
ADD . /go-ethereum
ENV CGO_CFLAGS="-O -D__BLST_PORTABLE__"
ENV CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__"
RUN export CGO_ENABLED=0
RUN go run build/ci.go install -static ./cmd/geth
RUN go install github.com/go-delve/delve/cmd/dlv@latest
# 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/
COPY --from=builder /go/bin/dlv /usr/local/bin/
EXPOSE 8545 8546 8547 30303 30303/udp 1234
ENTRYPOINT [ "dlv", "--listen=:1234", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/usr/local/bin/geth", "--"]