FROM pseudomuto/protoc-gen-doc AS builder

WORKDIR /build

COPY . .

RUN rm -rf ./dist
# RUN touch README_2.md

RUN protoc --doc_out=./doc --doc_opt=markdown,index.md proto/*.proto

RUN sh w_doc.sh

FROM scratch AS export

COPY --from=builder /build/README_2.md .
