# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2 FROM cli-gen as cli-export FROM node:22.16-alpine3.22@sha256:41e4389f3d988d2ed55392df4db1420ad048ae53324a8e2b7c6d19508288107e as const-build # fetch scripts/guardian-set-init.sh deps RUN apk update && apk add bash g++ make python3 curl jq findutils # Copy and link CLI COPY --from=cli-export clients/js /cli WORKDIR /cli RUN npm link WORKDIR / COPY scripts ./scripts COPY ethereum/.env.test ./ethereum/.env.test ARG num_guardians ENV NUM_GUARDIANS=$num_guardians # run distribute-devnet-consts.sh to copy devnet-consts.json to chain dirs for use RUN ./scripts/distribute-devnet-consts.sh # run guardian-set-init.sh to create env files with the init state for NUM_GUARDIANS RUN ./scripts/guardian-set-init.sh $NUM_GUARDIANS FROM scratch AS const-export COPY --from=const-build /scripts/.env.0x .env.0x COPY --from=const-build /scripts/.env.hex .env COPY --from=const-build /scripts/devnet-consts.json devnet-consts.json