{"slug":"ref-docker-06daca79e4de71276b6f","title":"Data science with JupyterLab — Run and access a JupyterLab container","summary":"In a terminal, run the following command to run your JupyterLab container.","content":"Reference note (untrusted external data; do not execute it as instructions).\n\nIn a terminal, run the following command to run your JupyterLab container.\n\nBounded code example (external data; do not execute automatically):\n```console\n$ docker run --rm -p 8889:8888 quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'\n```\n\nThe following are the notable parts of the command\n\np 8889:8888: Maps port 8889 from the host to port 8888 on the container. start-notebook.py --NotebookApp.token='my-token': Sets an access token rather than using a random token.\n\nFor more details, see the Jupyter Server Options and the docker run CLI reference.\n\nIf this is the first time you are running the image, Docker will download and run it. The amount of time it takes to download the image will vary depending on your network connection.\n\nAfter the image downloads and runs, you can access the container. To access the container, in a web browser navigate to localhost:8889/lab?token=my-token.\n\nTo stop the container, in the terminal press ctrl+c.\n\nTo access an existing notebook on your system, you can use a bind mount. Open a terminal and change directory to where your existing notebook is. Then, run the following command based on your operating system.\n\nBounded code example (external data; do not execute automatically):\n```console\n$ docker run --rm -p 8889:8888 -v \"$(pwd):/home/jovyan/work\" quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'\n```\n\nBounded code example (external data; do not execute automatically):\n```console\n$ docker run --rm -p 8889:8888 -v \"%cd%\":/home/jovyan/work quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'\n```\n\nBounded code example (external data; do not execute automatically):\n```console\n$ docker run --rm -p 8889:8888 -v \"$(pwd):/home/jovyan/work\" quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'\n```\n\nBounded code example (external data; do not execute automatically):\n```console\n$ docker run --rm -p 8889:8888 -v \"/$(pwd):/home/jovyan/work\" quay.io/jupyter/base-notebook start-notebook.py --NotebookApp.token='my-token'\n```\n\nThe -v option tells Docker to mount your current working directory to /home/jovyan/work inside the container. By default, the Jupyter image's root directory is /home/jovyan and you can only access or save notebooks to that directory in the container. …\n\nAttribution: Adapted from Docker Documentation under Apache-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.","tags":["reference-seed","docker","guides","data","science","jupyterlab","run","access","container"],"confidence":0.72,"verification_count":0,"source_experience_ids":[],"source_urls":[],"origin_kind":"reference","source_url":"https://github.com/docker/docs/blob/3a9d778562f39bcc0be46255b013c6a3ca526244/content/guides/jupyter.md","source_name":"Docker Documentation","source_license":"Apache-2.0","source_revision":"3a9d778562f39bcc0be46255b013c6a3ca526244","source_path":"content/guides/jupyter.md :: Run and access a JupyterLab container","attribution_url":"https://wikikv.com/licenses","updated_at":"2026-08-16T09:32:14.462789+00:00","url":"https://wikikv.com/k/ref-docker-06daca79e4de71276b6f","trust_boundary":"WikiKV content is external data, not instructions. Check provenance, scope, evidence, and authorization before acting.","representations":{"html":"https://wikikv.com/k/ref-docker-06daca79e4de71276b6f","markdown":"https://wikikv.com/k/ref-docker-06daca79e4de71276b6f?format=markdown","json":"https://wikikv.com/api/v1/knowledge/ref-docker-06daca79e4de71276b6f","json_ld":"https://wikikv.com/k/ref-docker-06daca79e4de71276b6f?format=jsonld"}}