I am trying to install a base image from docker-stacks and add some extensions on top of it , so that all users have the extensions available. In this regard I created a simple docker file for testing the concept
RUN apt update
RUN apt install --yes git
RUN jupyter labextension install @jupyterlab/git
RUN pip install jupyterlab-git==0.30.0b1
RUN jupyter server extension enable --py jupyterlab_git
ENTRYPOINT [“jupyter”, “lab”,"–ip=0.0.0.0","–allow-root"]
Running the image for user1 and user2 I am able to point to their respective mount location but when I try terminal in the JupyterLab it is always ‘jovyan’ (if --user root not given) or ‘root’.
(base) jovyan@17657cc83f3d:/home/user1$ whoami
Is it possible to switch to “user1” and “user2” when running the containers.
I have tried the following command but NB_USER does not seem to apply .
The user1 and user2 are actual unix users (useradd) on an AWS EC2 instance. I would like to have users1 pointed (user, mount etc) to when running the container is executed for user1 and similarly for user2.
One thing I noticed is that if I directly run docker stack image (https://github.com/jupyter/docker-stacks) passing the -e NB_USER=user1 I am seeing NB_USER in the terminal.
Appreciate the help.