mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
fixing dockerfile
This commit is contained in:
parent
f1894c12c5
commit
bdd7781bf3
1 changed files with 19 additions and 3 deletions
22
Dockerfile
22
Dockerfile
|
|
@ -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
|
||||
|
||||
|
||||
|
|
@ -34,4 +50,4 @@ COPY start.sh /start.sh
|
|||
RUN chmod +x /start.sh
|
||||
|
||||
EXPOSE 8545 8546 30303 4000
|
||||
ENTRYPOINT ["/bin/sh", "/start.sh"]
|
||||
ENTRYPOINT ["/bin/sh", "/start.sh"]
|
||||
Loading…
Reference in a new issue