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: Fix docs path mounting #601

Merged
merged 1 commit into from
Feb 12, 2019
Merged

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Feb 12, 2019

Fix the paths that docs repos are mounted into the container when
--doc and --resource are used to allow building more books. These
books expect the all repositories to be cloned into the same root
directory which is "normal" but isn't exactly how docker did it. It is
how --all does it. But users don't always do it that way....

This fixes the mounted paths so they are always mounted into
/doc/{reponame} in docker. Which should make the paths even more
consistent then when they are built locally. This should make it
possible to build the stack reference with docker.

Relates to #591

Fix the paths that docs repos are mounted into the container when
`--doc` and `--resource` are used to allow building more books. These
books expect the all repositories to be cloned into the same root
directory which is "normal" but isn't exactly how docker did it. It *is*
how `--all` does it. But users don't always do it that way....

This fixes the mounted paths so they are always mounted into
`/doc/{reponame}` in docker. Which *should* make the paths even more
consistent then when they are built locally. This should make it
possible to build the stack reference with docker.

Relates to elastic#591
@nik9000
Copy link
Member Author

nik9000 commented Feb 12, 2019

I'm so glad the script is in python and not shell.

Copy link

@ddillinger ddillinger left a comment

Choose a reason for hiding this comment

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

lgtm

repo_name = basename(repo_root)
if repo_root not in mounted_doc_repo_roots:
if repo_name in mounted_doc_repo_names:
raise ArgError("Can't mount two repos with the same " +

Choose a reason for hiding this comment

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

This is some good thinkin' right here

@nik9000
Copy link
Member Author

nik9000 commented Feb 12, 2019

❤️ @ddillinger!

@nik9000 nik9000 merged commit 53f34f1 into elastic:master Feb 12, 2019
nik9000 added a commit that referenced this pull request Feb 15, 2019
Fix the paths that docs repos are mounted into the container when
`--doc` and `--resource` are used to allow building more books. These
books expect the all repositories to be cloned into the same root
directory which is "normal" but isn't exactly how docker did it. It *is*
how `--all` does it. But users don't always do it that way....

This fixes the mounted paths so they are always mounted into
`/doc/{reponame}` in docker. Which *should* make the paths even more
consistent then when they are built locally. This should make it
possible to build the stack reference with docker.

Relates to #591
@lcawl lcawl mentioned this pull request Feb 27, 2019
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