# XDC4 v84 Docker image - ubuntu:24.04 base
FROM ubuntu:24.04

# Install runtime dependencies
RUN apt-get update && apt-get install -y \
    ca-certificates \
    curl \
    jq \
    && rm -rf /var/lib/apt/lists/*

# Create work directory
WORKDIR /work

# Copy the built binary
COPY geth /usr/local/bin/XDC
RUN chmod 755 /usr/local/bin/XDC

# Create xdcchain directory
RUN mkdir -p /work/xdcchain

# Expose ports
EXPOSE 8545 8546 8547 8551 30303 30304

# Default entrypoint
ENTRYPOINT ["/usr/local/bin/XDC"]
