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

Remove volume mounted on builds #64

Open
humitos opened this issue Jun 8, 2020 · 3 comments
Open

Remove volume mounted on builds #64

humitos opened this issue Jun 8, 2020 · 3 comments
Assignees

Comments

@humitos
Copy link
Member

humitos commented Jun 8, 2020

We shouldn't require this anymore now that we are running the git commands inside the Docker container.

This mount could probably removed completely: https://github.com/readthedocs/common/blob/master/dockerfiles/docker-compose.yml#L110

Allows to avoid VersionLocked exception when working locally with multiple builders (--scale-build 5).

@humitos
Copy link
Member Author

humitos commented Jun 8, 2020

It's not trivial to remove this. It fails with

/bin/sh: 1: cd: can't cd to /tmp/readthdocs_user_builds/sphinx-notfound-page/checkouts/latest

This is because we are creating some directories from the Host and using them from the Container. Example when syncing a repository. All of these directories should be created by calling environment.run(f'mkdir {self.project.doc_path}') (or similar) instead. This way, it will be created locally or inside the container itself.

@humitos
Copy link
Member Author

humitos commented Oct 4, 2021

Note that this will allow us to run all commands as docs users locally instead of using root inside the container's images.

@humitos
Copy link
Member Author

humitos commented Oct 4, 2021

Also note that there are other places that share the mounted volume with the host for specific tasks. For example, here we are reading the git repository with GitPython from the host: https://github.com/readthedocs/readthedocs.org/blob/5.24.0/readthedocs/vcs_support/backends/git.py#L82

The more we can avoid these (or split) the better isolation that we will have.

@humitos humitos self-assigned this Mar 12, 2022
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

No branches or pull requests

1 participant