# IJulia notebook() in Docker container

**URL:** <https://discourse.julialang.org/t/ijulia-notebook-in-docker-container/70462>\
**Category:** Jupyter-Notebook\
**Tags:** docker, ijulia\
**Created:** [October 27, 2021, 8:54am UTC](https://discourse.julialang.org/t/ijulia-notebook-in-docker-container/70462 "2021-10-27T08:54:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/angelv/32/133_2.png) [@angelv](https://discourse.julialang.org/u/angelv)\
**Post date:** [October 27, 2021, 8:54am UTC](https://discourse.julialang.org/t/ijulia-notebook-in-docker-container/70462/1 "2021-10-27T08:54:07Z")

</div>

Hello,

for testing purposes I am using a Docker container to run some Julia notebooks. With the project at hand I have no problems to start the Jupyter notebook by using

```julia
using IJulia
notebook()

```

This is not a problem either if running in a Virtual Machine, but when using a Docker container, the notebook function doesn’t let me specify the IP where jupyter should be listening, so I cannot open the Jupyter notebook from outside the container.

If I start Jupyter from outside Julia, but using the Conda distribution installed from within Julia (using package Conda.jl), then I have no problem starting the jupyter server and opening the notebooks from outside the container, by doing:

```julia
$ lib/loc-miniconda/bin/jupyter-notebook --ip=0.0.0.0 --no-browser

```

But in my setting, the `--ip` part is of essence to get it working. Do you know of a workaround? (in any case, it would be nice if the notebook function would allow as arguments some of the most common options to jupyter-notebook)

Thanks,

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 27, 2021, 9:51am UTC](https://discourse.julialang.org/t/ijulia-notebook-in-docker-container/70462/2 "2021-10-27T09:51:39Z")

</div>

Seems like a good feature request. For now you can put

```julia
c.NotebookApp.ip = '0.0.0.0'

```

in `~/.jupyter/jupyter_notebook_config.py` or create a wrapper script (e.g. `jupyter-ip`) with something like

```julia
#!/bin/bash
exec jupyter --ip=0.0.0.0 "${@}"

```

and point the `JUPYTER` environment variable to this script and re-run `Pkg.build("IJulia")`.

---

<div class="post-metadata">

**Author:** ![angelv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/angelv/32/133_2.png) [@angelv](https://discourse.julialang.org/u/angelv)\
**Post date:** [October 27, 2021, 2:30pm UTC](https://discourse.julialang.org/t/ijulia-notebook-in-docker-container/70462/3 "2021-10-27T14:30:06Z")

</div>

That’s great. Adding `jupyter_notebook_config.py` and settings for the IP and a password (so I don’t have to bother about the token), I can now launch the notebook directly from Julia inside the Docker container and open it in the host browser.

Thanks a lot. (but in any case I submitted a feature request in IJulia github to add the IP argument to the notebook function, but for the moment this solves my problem).
