From 299ce93e868d04d784c22fadf86517f68256f8a5 Mon Sep 17 00:00:00 2001 From: Donovin Emerson <87036676+doemerson123@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:53:59 -0600 Subject: [PATCH] Add third option: Route container to another local port (#1872) * Add third option: Route container to another local port Jupyter can have multiple local instances if the used ports don't overlap. Added this as a troubleshooting alternative for users who may want or need to have more than one Jupyter instance running. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update troubleshooting.md * Update troubleshooting.md * Update troubleshooting.md --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ayaz Salikhov --- docs/using/troubleshooting.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/using/troubleshooting.md b/docs/using/troubleshooting.md index b8c554b9..52aecdf3 100644 --- a/docs/using/troubleshooting.md +++ b/docs/using/troubleshooting.md @@ -310,3 +310,19 @@ If you are a regular user of VSCode and the Jupyter extension, you might experie You can achieve this from the `Preferences > Jupyter` menu in VScode: ![VSCode Preferences UI - Jupyter: Disable Jupyter Auto Start checkbox unchecked](../_static/using/troubleshooting/vscode-jupyter-settings.png) + +3. **Route container to unused local port** + + Instead of mapping Docker port `8888` to local port `8888`, map to another unused local port. + You can see an example of mapping to local port `8001`: + + ```bash + docker run -it --rm -p 8001:8888 jupyter/datascience-notebook + ``` + + When the terminal provides the link to access Jupyter: , + change the default port value of `8888` in the url to the port value mapped with the `docker run` command. + + In this example we use 8001, so the edited link would be: . + + Note: Port mapping for Jupyter has other applications outside of Docker. For example, it can be used to allow multiple Jupyter instances when using SSH to control cloud devices.