|
1 |
| -ARG ZBC_VERSION=latest |
2 |
| -FROM ghcr.io/zama-ai/zama-zbc-build:${ZBC_VERSION} AS build |
| 1 | +FROM golang:1.22-alpine AS build |
3 | 2 |
|
4 | 3 | # Use ARG values for tool versions
|
5 | 4 | ARG TARGETARCH
|
6 | 5 | ARG GETH_NODE_VERSION=v1.14.3
|
7 | 6 | ARG PRYSM_VERSION=v5.0.3
|
8 | 7 |
|
9 | 8 | # Install dependencies
|
10 |
| -RUN apt-get update &&\ |
11 |
| - apt-get install -y --no-install-recommends git git-lfs |
| 9 | +RUN apk update &&\ |
| 10 | + apk add --no-cache \ |
| 11 | + gcc g++ make musl-dev linux-headers git git-lfs |
12 | 12 |
|
13 | 13 | # Download and set up Prysm binaries
|
14 | 14 | ADD https://github.com/prysmaticlabs/prysm/releases/download/${PRYSM_VERSION}/beacon-chain-${PRYSM_VERSION}-linux-${TARGETARCH} /usr/bin/prysm-beacon
|
15 | 15 | ADD https://github.com/prysmaticlabs/prysm/releases/download/${PRYSM_VERSION}/validator-${PRYSM_VERSION}-linux-${TARGETARCH} /usr/bin/prysm-validator
|
16 | 16 | ADD https://github.com/prysmaticlabs/prysm/releases/download/${PRYSM_VERSION}/prysmctl-${PRYSM_VERSION}-linux-${TARGETARCH} /usr/bin/prysm-ctl
|
17 | 17 | RUN chmod +x /usr/bin/prysm-beacon /usr/bin/prysm-validator /usr/bin/prysm-ctl
|
18 | 18 |
|
19 |
| -WORKDIR /src/geth |
| 19 | +WORKDIR /go-ethereum |
20 | 20 |
|
21 | 21 | # Copy and build the Geth source code
|
22 | 22 | COPY . .
|
23 | 23 | RUN go build ./cmd/bootnode && make geth
|
24 | 24 |
|
25 | 25 | # Set up final image
|
26 |
| -FROM ghcr.io/zama-ai/zama-zbc-build:${ZBC_VERSION} |
| 26 | +FROM alpine:3.20.3 |
27 | 27 |
|
28 | 28 | # Create necessary directories
|
29 | 29 | RUN mkdir -p /val-data /rpc-data /usr/share/devnet-resources /val-data/consensus/beacondata/network-keys
|
30 | 30 |
|
31 | 31 | # Copy built binaries and scripts from build
|
32 |
| -COPY --from=build /src/geth/bootnode /usr/bin/ |
33 |
| -COPY --from=build /src/geth/build/bin/geth /usr/bin/ |
| 32 | +COPY --from=build /go-ethereum/bootnode /usr/bin/ |
| 33 | +COPY --from=build /go-ethereum/build/bin/geth /usr/bin/ |
34 | 34 | COPY --from=build /usr/bin/prysm-beacon /usr/bin/prysm-validator /usr/bin/prysm-ctl /usr/bin/
|
35 | 35 |
|
36 | 36 | # Copy config files and scripts
|
37 |
| -COPY --from=build /src/geth/local-testnet/prep/execution/genesis.json /usr/share/devnet-resources/ |
38 |
| -COPY --from=build /src/geth/local-testnet/prep/boot.key /usr/share/devnet-resources/ |
39 |
| -COPY --from=build /src/geth/local-testnet/prep/node1/keystore/ /val-data/keystore/ |
40 |
| -COPY --from=build /src/geth/local-testnet/prep/consensus/config.yml /usr/share/devnet-resources/consensus-config.yml |
41 |
| -COPY --from=build /src/geth/local-testnet/prep/consensus/validator-beacon-static-network-keys /val-data/consensus/beacondata/network-keys |
42 |
| -COPY --from=build /src/geth/scripts/run-single-node-devnet.sh /entrypoint.sh |
43 |
| -COPY --from=build /src/geth/scripts/faucet.sh /usr/bin/faucet |
| 37 | +COPY --from=build /go-ethereum/local-testnet/prep/execution/genesis.json /usr/share/devnet-resources/ |
| 38 | +COPY --from=build /go-ethereum/local-testnet/prep/boot.key /usr/share/devnet-resources/ |
| 39 | +COPY --from=build /go-ethereum/local-testnet/prep/node1/keystore/ /val-data/keystore/ |
| 40 | +COPY --from=build /go-ethereum/local-testnet/prep/consensus/config.yml /usr/share/devnet-resources/consensus-config.yml |
| 41 | +COPY --from=build /go-ethereum/local-testnet/prep/consensus/validator-beacon-static-network-keys /val-data/consensus/beacondata/network-keys |
| 42 | +COPY --from=build /go-ethereum/scripts/run-single-node-devnet.sh /entrypoint.sh |
| 43 | +COPY --from=build /go-ethereum/scripts/faucet.sh /usr/bin/faucet |
44 | 44 |
|
45 | 45 | WORKDIR /
|
46 | 46 |
|
|
0 commit comments