- Simplified Dockerfile to use 0gchain-NG for all current 0G networks - Removed special handling for aristotle (0gchain-Aristotle) and galileo - Supports new chain names: 0g-mainnet, 0g-galileo-testnet - Uses unified release download URL: https://github.com/0gfoundation/0gchain-NG Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
22 lines
957 B
Docker
22 lines
957 B
Docker
|
|
FROM rockylinux:9
|
|
|
|
COPY ./scripts/init.sh /usr/local/bin/init.sh
|
|
RUN chmod +x /usr/local/bin/init.sh
|
|
|
|
#RUN yum install -y curl tar gzip && yum clean all
|
|
|
|
ARG ZERO_GRAVITY_VERSION
|
|
ARG ZERO_GRAVITY_CHAIN_SPEC
|
|
# Use 0gchain-NG for all current 0G networks (mainnet and testnets)
|
|
RUN curl -sL https://github.com/0gfoundation/0gchain-NG/releases/download/v${ZERO_GRAVITY_VERSION}/${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}.tar.gz -o /tmp/${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}.tar.gz
|
|
RUN tar -xzf /tmp/${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}.tar.gz -C /tmp
|
|
RUN mkdir -p /0g && \
|
|
cp -a /tmp/${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}/* /0g/ 2>/dev/null || true; \
|
|
cp -a /tmp/${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}/.[^.]* /0g/ 2>/dev/null || true; \
|
|
rm -rf /tmp/${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}
|
|
|
|
RUN chmod +x /0g/bin/0gchaind
|
|
RUN chmod +x /0g/bin/geth
|
|
|
|
ENTRYPOINT [ "init.sh" ] |