Created
May 2, 2024 18:22
-
-
Save sheldonhull/9ce2fa6a81fcf6ee2ce7b75371337d9d to your computer and use it in GitHub Desktop.
create asciidoc content via dockerized command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# grabbed from blog somewhere and couldn't find to link. minor modification to part to be in .artifacts | |
mkdir .artifacts || true | |
DOCS_VOL=$(docker volume create docs-vol) | |
DOCS_HELPER=$(docker create -v ${DOCS_VOL}:/documents alpine true) | |
docker cp $(pwd)/docs ${DOCS_HELPER}:/documents/docs | |
docker run --rm -v ${DOCS_VOL}:/documents ${KRAMDOC_DOCKER_IMAGE} find ./ -name "*.md" -type f -exec sh -c 'kramdoc {}' \; | |
docker cp ${DOCS_HELPER}:/documents/docs $(pwd)/.artifacts | |
docker rm ${DOCS_HELPER} | |
docker volume rm ${DOCS_VOL} | |
find $(pwd)/.artifacts/docs/ -name "*.md" -type f -exec sh -c 'rm {}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment