fixing dockerfile

This commit is contained in:
Yohan9206 2025-08-03 23:02:58 +03:00
parent f1894c12c5
commit bdd7781bf3

View file

@ -1,3 +1,7 @@
# Support setting various labels on the final image
ARG COMMIT=""
ARG VERSION=""
ARG BUILDNUM=""
# Base Geth build stage remains the same
# Additional stage for Blockscout dependencies
@ -19,13 +23,25 @@ RUN mix do ecto.create, ecto.migrate
RUN mix phx.digest && MIX_ENV=prod mix release
# Build Geth in a stock Go builder container
FROM golang:1.24-alpine AS builder
RUN apk add --no-cache gcc musl-dev linux-headers git
# Get dependencies - will also be cached if we won't change go.mod/go.sum
COPY go.mod /go-ethereum/
COPY go.sum /go-ethereum/
RUN cd /go-ethereum && go mod download
ADD . /go-ethereum
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
# Final image
FROM alpine:latest
RUN apk add --no-cache ca-certificates libstdc++ postgresql-client su-exec bash curl
#COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
COPY --from=geth-builder /go-ethereum/build/bin/geth /usr/local/bin/
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
COPY --from=blockscout-builder /blockscout /blockscout