-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (44 loc) · 1.91 KB
/
Copy pathDockerfile
File metadata and controls
49 lines (44 loc) · 1.91 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM golang:1.26 AS builder
WORKDIR /work
ARG ETH_BEACON_GENESIS_VERSION=v0.0.6
ARG ETH_BEACON_GENESIS_SHA=3feb8e01383762b480552eb22832a6c8ca7a6448
RUN git clone -q https://github.com/ethpandaops/eth-beacon-genesis.git \
&& cd eth-beacon-genesis \
&& git checkout -q ${ETH_BEACON_GENESIS_VERSION} \
&& actual_sha=$(git rev-parse HEAD) \
&& [ "${actual_sha}" = "${ETH_BEACON_GENESIS_SHA}" ] || { \
echo "eth-beacon-genesis ${ETH_BEACON_GENESIS_VERSION} resolved to ${actual_sha}, expected ${ETH_BEACON_GENESIS_SHA}" >&2; \
exit 1; \
} \
&& make \
&& go install github.com/protolambda/eth2-val-tools@latest \
&& go install github.com/miguelmota/go-ethereum-hdwallet/cmd/geth-hdwallet@latest
FROM debian:latest
WORKDIR /work
VOLUME ["/config", "/data"]
EXPOSE 8000/tcp
RUN apt-get update && \
apt-get install --no-install-recommends -y \
ca-certificates gettext-base yq wget curl bc && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY apps /apps
# Install jq with architecture detection
RUN ARCH=$(dpkg --print-architecture) && \
if [ "$ARCH" = "amd64" ]; then \
curl -L https://github.com/jqlang/jq/releases/latest/download/jq-linux-amd64 -o /usr/local/bin/jq; \
elif [ "$ARCH" = "arm64" ]; then \
curl -L https://github.com/jqlang/jq/releases/latest/download/jq-linux-arm64 -o /usr/local/bin/jq; \
else \
echo "Unsupported architecture: $ARCH" && exit 1; \
fi && \
chmod +x /usr/local/bin/jq
ENV PATH="/root/.cargo/bin:${PATH}"
COPY --from=builder /work/eth-beacon-genesis/bin/eth-genesis-state-generator /usr/local/bin/eth-genesis-state-generator
COPY --from=builder /go/bin/eth2-val-tools /usr/local/bin/eth2-val-tools
COPY --from=builder /go/bin/geth-hdwallet /usr/local/bin/geth-hdwallet
COPY config-example /config
COPY defaults /defaults
COPY entrypoint.sh .
ENTRYPOINT [ "/work/entrypoint.sh" ]