2023-02-02 19:36:37 +08:00
|
|
|
FROM golang:1.19-alpine as bsc
|
2021-10-18 18:16:32 +08:00
|
|
|
|
2023-04-10 18:36:45 +08:00
|
|
|
RUN apk add --no-cache make cmake gcc musl-dev linux-headers git bash build-base libc-dev
|
2021-10-18 18:16:32 +08:00
|
|
|
|
|
|
|
ADD . /bsc
|
|
|
|
WORKDIR /bsc
|
2023-04-10 18:36:45 +08:00
|
|
|
ENV CGO_CFLAGS="-O -D__BLST_PORTABLE__"
|
|
|
|
ENV CGO_CFLAGS_ALLOW="-O -D__BLST_PORTABLE__"
|
2023-02-03 17:38:20 +08:00
|
|
|
RUN make geth
|
2021-10-18 18:16:32 +08:00
|
|
|
RUN mv /bsc/build/bin/geth /usr/local/bin/geth
|
|
|
|
|
|
|
|
EXPOSE 8545 8547 30303 30303/udp
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/geth" ]
|
|
|
|
|
|
|
|
FROM ethereum/solc:0.6.4-alpine as bsc-genesis
|
|
|
|
|
2023-04-10 18:36:45 +08:00
|
|
|
RUN apk add --no-cache ca-certificates npm nodejs bash alpine-sdk expect
|
2021-10-18 18:16:32 +08:00
|
|
|
|
2023-06-30 12:06:56 +08:00
|
|
|
RUN git clone https://github.com/bnb-chain/bsc-genesis-contract.git /root/genesis \
|
2023-03-23 10:39:20 +08:00
|
|
|
&& cd /root/genesis && npm install
|
2021-10-18 18:16:32 +08:00
|
|
|
|
|
|
|
COPY docker/init_holders.template /root/genesis/init_holders.template
|
|
|
|
|
|
|
|
COPY --from=bsc /usr/local/bin/geth /usr/local/bin/geth
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/bin/bash" ]
|