I’m having a problem running JupyterLab locally, and setting the password via Docker Compose file. I can get it working via a docker run command, but not via Compose
This also works fine with the password set and stored within the container in ./jupyter/jupyter_server_config.json
But to maintain the password when I rebuild the container, I’d like to have the password set in the Compose file rather than saved into the JSON file.
I’ve found various answers around the web to include the argon hashed password into a docker run command, but can’t find how to do this within a compose file.
services:
jupyter:
container_name: jup
image: quay.io/jupyter/scipy-notebook:latest
ports:
- 8888:8888
restart: unless-stopped
environment:
- TZ=Australia/Sydney
command:
- start-notebook.py
volumes:
- ./work:/home/joyvan/work
I’ve tried :-
command: - start-notebook.py --PasswordIdentityProvider.hashed_password='argon2:$argon2id$v=19$m=10240,t=10,p=8$dRrGNTESTDATAdKLm+YVjQ$FbTESTDATAG66kyt4vw3/+TjrT5jYtYXhy+v5QX0HY4'
within the file. Also :-
command: - start-notebook.py - --PasswordIdentityProvider.hashed_password='argon2:$argon2id$v=19$m=10240,t=10,p=8$dRrGNTESTDATAdKLm+YVjQ$FbTESTDATAG66kyt4vw3/+TjrT5jYtYXhy+v5QX0HY4'
I’ve also tried including the argon hash under environment variables PASSWORD and HASHED_PASSWORD, double quotes, single quotes, $$ rather than $ to escape the $ character – all with no success.
Hugh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.