Mount docs source read-only in Docker build container#3328
Merged
Conversation
|
A documentation preview will be available soon. Request a new doc build by commenting
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here. |
timto-elastic
previously approved these changes
May 3, 2026
cotti
previously approved these changes
May 3, 2026
2 tasks
When the Makefile runs `rm -rf tests` before invoking build_docs --docker-run, the directory no longer exists on the host. Docker auto-creates missing bind-mount targets as root, causing EACCES for the non-root container user. Pre-create the directory with makedirs so the mount is owned by the current user. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The integration tests write to /docs_build/.repos/target_repo.git in start_air_gapped. Shadow that path with a writable tmpfs so the test can create its own repo there without violating the ro source mount. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ild ro Mounting /docs_build:ro broke the integration tests (writes to .repos, .cache etc.) and Docker prevents tmpfs mounts inside a ro bind mount. Instead keep /docs_build writable and shadow only .buildkite/hooks with an empty tmpfs. Any code running inside the container can write there but the writes go to an ephemeral tmpfs, never reaching the host -- so the Buildkite hook-injection attack vector is closed without breaking builds.
cotti
approved these changes
May 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tightens the Docker mount for the docs build source directory to read-only. The build output is written to the built-docs clone inside the container and pushed via SSH — the source tree never needs to be writable. All product-repo mounts already use
:ro,cached; this aligns/docs_buildwith the same policy.Two follow-up fixes for the test suite, which assumed a writable source mount:
.rubocop_cache(relative, under/docs_build) to/tmp/rubocop_cacheresources/web/tests/, which parcel writes build artifacts into before jest reads them across a second Docker invocation