Docker - Setup Spark, Jupyter binding local folder in hostmachine

Published on
1 mins read
––– views
Photo by Chris Ried on Unsplash
python-notes

https://hub.docker.com/r/jupyter/all-spark-notebook

1. Docker pull local image

docker pull jupyter/all-spark-notebook

2. Start Services in windows

docker run -it --rm -p 8888:8888 jupyter/all-spark-notebook

3. to mount local drive to Docker Container

IN DOCKER DASHBOARD

image

docker ps
# Get the container that was created recently
docker exec -it <container_id or name> /bin/bash

Run the chown command in the Docker Container shell

chown -R 1000 work/

4. QUIT the container and RESTART DOCKER RUN FROM WINDOWS

docker run -p 8888:8888 -v C:\Users\hai\Documents\GitHub\blog:/home/jovyan/work jupyter/all-spark-notebook
docker run -p 8888:8888 -v C:\Users\vpandian\VijayAnandRP\GitHub\blog:/home/jovyan/work jupyter/all-spark-notebook

Reference - https://devtonight.com/questions/how-to-run-jupyter-notebooks-locally-in-a-docker-container