We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa3ae91 commit 41907f3Copy full SHA for 41907f3
1 file changed
Dockerfile
@@ -3,10 +3,14 @@
3
# =========================
4
FROM golang:1.25-alpine AS builder
5
6
-ENV CGO_ENABLED=0 \
+# CGO is required for herumi/bls-eth-go-binary
7
+ENV CGO_ENABLED=1 \
8
GOOS=linux \
9
GOARCH=amd64
10
11
+# Install build dependencies for CGO
12
+RUN apk add --no-cache gcc musl-dev
13
+
14
WORKDIR /app
15
COPY go.mod go.sum ./
16
RUN go mod download
@@ -18,7 +22,10 @@ RUN go build -o /app/bin/app ./cmd/...
18
22
# Stage 2: runtime
19
23
20
24
FROM alpine:3.20
21
-RUN adduser -D -u 10001 appuser
25
26
+# Install runtime dependencies for CGO binary
27
+RUN apk add --no-cache libc6-compat && \
28
+ adduser -D -u 10001 appuser
29
30
WORKDIR /home/appuser
31
0 commit comments