Jupyter Docker with password text

I am trying to run a stateless Jupyter notebook using the docker image. How can I pass in new password text when I create a new notebook?

So far I couldn’t figure how to pass in my password text in the docker run, but to generate the password hash prior to the run.

$ HASH=$(docker run -it jupyter/minimal-notebook python -c "from notebook import auth; print(auth.passwd('${JupyterPassword}')))"
$ docker run -it -d -p 8080:8888 -e GEN_CERT=yes jupyter/minimal-notebook start-notebook.sh --NotebookApp.password=${HASH}

Is there anyway I can pass in ${JupyterPassword} directly without having to generate the hash?

I’m not too sure if this can be done with an unhashed password, but maybe you could try passing a token instead which can be plain text:

$ docker run -it -d -p 8080:8888 -e GEN_CERT=yes jupyter/minimal-notebook start-notebook.sh --NotebookApp.token="${JupyterPassword}"

Then you can enter the password directly in the token field (which appears in place of the password field in your example).