As shown in the below Dockerfile, I declared an environment variable using the ENV keyword, then opened jupyterhub using ENTRYPOINT keyword.
And I created a container with docker run -d -v <some_path>:/VOLUME/ -p 9020:80 --ulimit core=0 --shm-size=32G --name <cnt_name> <img_name>.
However, I can't get the variable "TZ" on jupyterhub, not only Ipython but also terminal.
On the other hand, I can get the variable when I access the terminal with docker exec -it <cnt_name> bash.
Why does it happen and how can I use the variable "TZ" on the jupyterhub?
FROM pytorchlightning/pytorch_lightning:base-cuda-py3.9-torch1.11
ENV TZ=Asia/Seoul
RUN apt update
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt install -y nodejs vim sudo libgl1-mesa-glx
RUN npm install -g configurable-http-proxy
RUN pip install pytorch_lightning scikit-learn ray[tune] wandb
RUN pip install torchmetrics torchsummary
RUN pip install pandas opencv-python tqdm matplotlib
RUN pip install jupyter jupyterlab jupyterhub
RUN jupyter labextension install @jupyterlab/toc @jupyter-widgets/jupyterlab-manager
RUN useradd -rm -G sudo kslee -s /bin/bash -p $(perl -e 'print crypt($ARGV[0], "password")' '1234') -u 1003
RUN chmod 777 /tmp
WORKDIR /jupyterhub
EXPOSE 80
ENTRYPOINT ["jupyterhub", "--port", "80", "--ip", "0.0.0.0", "--Spawner.default_url", "/lab", "--Spawner.notebook_dir", "/VOLUME", "--Authenticator.admin_users", "\"{'kslee'}\""]