-
Notifications
You must be signed in to change notification settings - Fork 308
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
Granting users admin permissions on their container #154
Comments
I have the same issue here. I tried to find the |
If you are using docker-stacks and set the environment c.DockerSpawner.environment = {
'GRANT_SUDO': '1',
} @yuanzhou that's unlikely to be related. |
I'm using docker-stacks as base image, but GRANT_SUDO doesn't seems to work: c.DockerSpawner.container_image = 'jupyter/datascience-notebook' but it still asks for a password when running !sudo ls Running !ls /etc/sudoers.d just returns README, no /etc/sudoers.d/notebook |
@parente I think you know the sudo stuff on docker-stacks better than I do. |
@tovmeod I was just looking into this, and I think there's more work needed to get the root-level permissions using docker-stacks, which are required to grant sudo permissions. Try this: c.DockerSpawner.container_image = 'jupyter/datascience-notebook'
# must start container as root in order to grant sudo permissions
c.DockerSpawner.extra_create_kwargs = {'user': 'root'}
c.DockerSpawner.environment = {
'GRANT_SUDO': '1',
'UID': '0', # workaround https://github.com/jupyter/docker-stacks/pull/420
} |
The way that I got around this was creating a new container image with a docker file like this:
Then I would set I think this introduces security concerns in some situations. In my case I was using it with only trusted users and within a private networks so the risks were acceptable. |
On Mac, i was trying to run datascience notebook, using following command I need sudo permissions on docker image. I get following response, Note: See the first line from the command response, saying "Container must be run as root to grant sudo permissions"Is there anything to be corrected in my above command?
|
At the CLI, you need to add For example, @nazeels The container needs to start as @minrk I'm not sure how to tell JupyterHub to launch the image as the |
Actually, adding a |
Thank you @parente it helped me to run the container. |
Hi! I’m going through and cleaning up old/stale issues on this repo. It looks like this issue is resolved. Feel free to open a new Issue if you are still having this trouble. |
How do you give users permission to install packages on their server?
Specifically I am trying to connect to mssql, as part of this I need to install
freetds
Here are the two paths I go down:
So I try it with
sudo
and I don't know the password for jovyan.
The text was updated successfully, but these errors were encountered: