James and I both wanted to be able to quickly and easily maintain the awesome asciidoc in fineract-doc. To me this means a quick / local dev workflow. I came up with the attached Dockerfile (clear-signed for more of my own gpg practice ... pass that to gpg/PGP/etc. to remove the signature and use it). It's just a port of .github/workflows/build-documentation.yml to Docker that I can easily run it locally.
The first build takes about 10min on my machine, and re-builds (with cache) are about 2.5min. This still seems pretty darn slow. Is this expected? Anyone have tips for faster doc editing/re-building? If a local-friendly doc build is something we might want to include right in the code, how might we do that? Is that something folks (besides me) might want? It feels odd to me to only rely on GitHub Actions for doc builds, so I'd be in favor of that. James is currently running into this on his mac: https://forums.docker.com/t/fixing-err-docker-credential-desktop-resolves-to-executable-in-current-directory/136358/4 . His Docker Desktop is also in the process of updating so that might just fix it. We also discussed having the fineract-doc build save and auto-publish its outputs. Seems like that would be nice too, yes?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 # Build Fineract documentation with Docker! # Author: Adam Monsen <hair...@gmail.com> # Copyright assignment to: ASF Fineract # License: Apache 2.0 # ( local-friendly version of Fineract's .github/workflows/build-documentation.yml ) # place in Fineract working copy and make that your current working dir # # build with: # # docker build -t fineract-docs-builder . # # run with: # # docker run --rm -it -v "$(pwd):/fineract" --user "$(id -u):$(id -g)" fineract-docs-builder ./gradlew --no-daemon --console=plain --stacktrace doc # # debug the build with: # # docker build --progress=plain -t fineract-docs-builder . # # to do: # # - [ ] optimize, clean up build products, collapse layers, use/create smaller images, etc. etc. etc. FROM ubuntu:24.04 RUN apt-get update RUN apt-get --assume-yes --no-install-recommends install curl ca-certificates gpg RUN curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg RUN echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list RUN apt-get update RUN apt-get --assume-yes --no-install-recommends install zulu17-jdk xz-utils ENV NODEJS_VERSION=v16.20.2 RUN cd /tmp \ && mkdir nodeinstall \ && cd nodeinstall \ && curl -O https://nodejs.org/download/release/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.xz \ && tar -xJf node-$NODE_VERSION-linux-x64.tar.xz \ && cd node-$NODE_VERSION-linux-x64 \ && cp -a bin include lib share /usr/local \ && cd /tmp \ && rm -rf node-$NODE_VERSION-linux-x64* RUN npm i -g vega-cli --unsafe RUN apt-get --assume-yes --no-install-recommends install ghostscript graphviz WORKDIR /fineract -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEE2AAt8o4AsOdm9pv4m12ZP4NvKcAFAmdbkesACgkQm12ZP4Nv KcCaZgf/YeYPgS7nEpWP7TuA5df/DSTykv5T0E1xxYRU01qDP5PxMIM6wDVb5D5l eZmdTffrCv/VpMG7WoV/+oV9EdEfIoWk9WPTROYpthFGpJX+nr/8x6yqotMCoXT7 yQLrAKKG6+RgyFxcI6xvqIaGut5S+fdDQwsV0PJLGSHwnD/Hf1834tZgScmgYRTn 6m/mjkF+D0F1li6Bm4K+FDRmrSfOM7KQTpHc1ib2tptzmxv+ZC1XtIDFsP9y98TJ KJXOs2nEIpJ38ZzUT5t6amLrJMW7tVcAZEzZWBJ7/F2W92WQIrfwda0YSDiI4S8G RRJSqF/6yArwLL2xVGZnn3ROIEthRw== =iC5p -----END PGP SIGNATURE-----