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 command for running container doesn't work #163

Open
Dave3991 opened this issue Nov 12, 2019 · 2 comments
Open

docker command for running container doesn't work #163

Dave3991 opened this issue Nov 12, 2019 · 2 comments

Comments

@Dave3991
Copy link

Dave3991 commented Nov 12, 2019

Hi, command in readme for running at localhost doesn't work for me.
Old command:
docker run -i -t -p 8888:8888 continuumio/anaconda3 conda "install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='0.0.0.0' --port=8888 --no-browser"

I fixed it with this:
docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='0.0.0.0' --port=8888 --no-browser --allow-root"

@nok
Copy link

nok commented Nov 20, 2019

Please add the exception or error message.

For me it's a duplicate issue, see #94 and #85.

You can find the mentioned command on several pages, e.g.:

Running processes as root in a docker container isn't best practice, but it's indeed a design decicion. In addition the package jupyter can change it's behaviour, because there is no specific version defined. What means that alwyas the latest version of jupyter will be installed.

@kobecow
Copy link

kobecow commented Jan 11, 2020

Hi there.
I got same issue. I followed following docs to run continuumio/anaconda3 container.

https://hub.docker.com/r/continuumio/anaconda3
https://docs.anaconda.com/anaconda/user-guide/tasks/docker/

I think @Dave3991 and I just followed these docs. I meant we copied and pasted commands. And then failed to run container.
I recommend adding --allow-root into sample command.

command I used and error message below.


nishiseiji@nishiseijinombp temp % sudo docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser"
Password:
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /opt/conda

  added / updated specs:
    - jupyter


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-4.8.1                |           py37_0         2.8 MB
    ------------------------------------------------------------
                                           Total:         2.8 MB

The following packages will be UPDATED:

  conda                                       4.7.12-py37_0 --> 4.8.1-py37_0


Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
[I 06:42:07.306 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 06:42:07.484 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 06:42:07.524 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
[I 06:42:07.524 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[C 06:42:07.529 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.

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

3 participants