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

Trying to install Java #79

Closed
aruizga7 opened this issue Dec 9, 2015 · 5 comments
Closed

Trying to install Java #79

aruizga7 opened this issue Dec 9, 2015 · 5 comments
Labels
type:Question A question about the use of the docker stack images

Comments

@aruizga7
Copy link

aruizga7 commented Dec 9, 2015

Hi, I am trying to install Java but I have problem with root permission. Any idea about how to solve this?
root

@parente
Copy link
Member

parente commented Dec 10, 2015

In general, the README for the stack you're running about how to grant the jovyan user sudo. It's an environment variable GRANT_SUDO you have to set on docker run.

But since you're using the quick trick we doc'ed over here (jupyter/dashboards#152 (comment)), the container is not starting as root, the start-notebook script is not running, and so jovyan won't wind up with sudo even if you set the env var.

The right way to do this is really to build a new docker image with the libs you want preinstalled like:

FROM jupyter/datascience-notebook
USER jovyan
RUN pip install jupyter_dashboards
USER root
RUN apt-get install openjdk-7-jdk

Then run it like:

docker build -t my/dashboard-notebook .
docker run -d -e GRANT_SUDO=yes -p 8888:8888 my/dashboard-notebook

The GRANT_SUDO is only need if you still plan to need / use sudo in the container after starting it (e.g., to configure additional libraries).

@aruizga7
Copy link
Author

Thanks @parente You're everywhere ;-)

I am forking and making these changes then in the libs. Thanks!

@parente
Copy link
Member

parente commented Dec 10, 2015

Occupational hazard? :)

No need to fork to git repos. Just write a new Dockerfile like the one above. The jupyter/datascience-notebook is maintained on Docker Hub. You can just inherit FROM it and install what you need. The benefit is that when the base image updates due to other pull requests here, you can rebuild easily.

@parente
Copy link
Member

parente commented Dec 17, 2015

@aruizga7 did you get it installed? If so, we can close this.

@parente parente added the type:Question A question about the use of the docker stack images label Jan 9, 2016
@parente
Copy link
Member

parente commented Jan 12, 2016

Closing. Can reopen if this is still a problem.

@parente parente closed this as completed Jan 12, 2016
rochaporto pushed a commit to rochaporto/docker-stacks that referenced this issue Jan 23, 2019
reduce special subclasses for google
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Question A question about the use of the docker stack images
Projects
None yet
Development

No branches or pull requests

2 participants