-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
RFE: readthedocs container startup customization #10815
Comments
For security reasons, we won't allow users to change the options when a container is started. Allowing to pass We are considering allowing users to run commands as root, and there is also an open issue about allowing to install apt-packages while using |
@stsewd I understand your concern I guess it's not possible to have docker setup inside readthedocs container image. I did come across the post that --privileged is required to get docker setup in a container. Note I tried this manually without --privileged and I got the socket error that you typically get with docker service unable to connect |
I'm closing this issue since there isn't too much we can do here. Feel free to re-open if you consider. |
What's the problem this feature will solve?
I am trying to setup a docker instance inside the readthedocs container build inorder to go about with running
docker
commands as part of the documentation build processDescribe the solution you'd like
I came across https://docs.readthedocs.io/en/stable/build-customization.html link which allows one to customize the build process. What i dont know is how i can set these settings in
.readthedocs.yaml
. The main thing i need is to be able to customize how docker is started i think i need--privileged
option set when starting the containerAlternative solutions
I was able run the following steps locally in the readthedocs container to install docker
Finally after this i started the docker service and ran the container
To summarize i ran the following commands in the container a few were typos, so i ommitted them out
Additional context
My question is first.
Can we have option in
.readthedocs.yaml
to pass arbitrary options as part of the container invocation. Second, i am not sure if its possible to run some script as root. I had to usedocker run -u root
to get into root user. The default user isdocs
.I need to run some commands as root user and i can confirm the
docs
user can't run commands with sudo priviledgesIn .readthedocs.yaml there is build.commands but i think this may not run in context of root user i need some clarification on this.
My end goal would be to be able to use something like sphinx program-output to run docker commands in the documentation so commands can work. At the moment i dont know if this is possible without troubleshooting the docs build and then inspecting the logs. I know i can do this locally on my end using the readthedocs container but i dont know the internals. I was wondering if someone could help me set this up or provide some insight into how we can go about adding some features to extend readthedocs support for further customization.
The text was updated successfully, but these errors were encountered: