Jupyter notebook terminal starts up at /root folder. How can I change the default path to /nfs in dockerfile

10/21/2021

I am using Dockerfile to run shell script of jupyter notebook. When this jupyter terminal starts up, it's starting at /root path, but I want terminal to start with default path /nfs. What change can be made in the Dockerfile such that this terminal starts at /nfs path ?

-- divya krishana
docker
dockerfile
jupyter
jupyter-notebook
kubernetes

1 Answer

10/21/2021

you can add below entry in your dockerfile so everything after mentioned the WORKDIR step would be in the directory you have mentioned.

WORKDIR /nfs
-- Sam-Sundar
Source: StackOverflow