Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: mount source and resources as read-only #1724

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

arichardson
Copy link
Contributor

This avoids writing output files into the source tree by changing the imagesoutdir variable to point at the build tree. We can bind mount source and docs-resources as read-only into the build directory and then create symlinks to ensure the docker container sees the appropriate directory layout.

Note: imagesoutdir must be an absolute path since otherwise asciidoctor-mathemtical interprets it as a path relative to the source dir rather than the current working directory (asciidoctor-diagram does the expected thing and interprets it relative to the cwd).

This avoids writing output files into the source tree by changing the
imagesoutdir variable to point at the build tree. We can bind mount
source and docs-resources as read-only into the build directory and
then create symlinks to ensure the docker container sees the
appropriate directory layout.

Note: imagesoutdir must be an absolute path since otherwise
asciidoctor-mathemtical interprets it as a path relative to the source
dir rather than the current working directory (asciidoctor-diagram does
the expected thing and interprets it relative to the cwd).
Copy link
Member

@aswaterman aswaterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems right, but I reserve the right to revert this if another build nondeterminism crops up.

@aswaterman aswaterman merged commit b796659 into riscv:main Nov 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants