ARG CL_IMAGE ARG CL_VERSION FROM ${CL_IMAGE}:${CL_VERSION} # Layer the shared CometBFT bootstrap lib + the chain init.sh onto the upstream # cosmos binary image (alpine-based, has sh+apk; runs nonroot by default — the compose # sets user: root so init.sh can apk-add curl and write the /root home). USER root COPY ./scripts/cometbft-common.sh /usr/local/bin/cometbft-common.sh COPY ./scripts/init.sh /usr/local/bin/init.sh RUN chmod +x /usr/local/bin/init.sh /usr/local/bin/cometbft-common.sh ENTRYPOINT ["init.sh"]