From f081d9efd71a0542c786bbf3d701b17752fd3b4a Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Tue, 12 Mar 2019 21:00:02 -0400 Subject: [PATCH 1/2] Enable color prompts --- base-notebook/Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index 82c929b3ab..571ffdeeed 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -41,8 +41,16 @@ ENV CONDA_DIR=/opt/conda \ ENV PATH=$CONDA_DIR/bin:$PATH \ HOME=/home/$NB_USER +# Add a script that we will use to correct permissions after running certain commands ADD fix-permissions /usr/local/bin/fix-permissions -# Create jovyan user with UID=1000 and in the 'users' group + +# Enable prompt color in the skeleton .bashrc before creating the default NB_USER +# and in the default bash.bashrc for the case where the user home directory gets +# overridden. +RUN sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc && \ + sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/bash.bashrc + +# Create NB_USER wtih name jovyan user with UID=1000 and in the 'users' group # and make sure these dirs are writable by the `users` group. RUN groupadd wheel -g 11 && \ echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \ From 0023598a6574fd67ec33d702e39f1d021a632d66 Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Wed, 13 Mar 2019 08:02:54 -0400 Subject: [PATCH 2/2] Force color only exists in the /etc/skel/.bashrc --- base-notebook/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index 571ffdeeed..2e9f5d4bbc 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -45,10 +45,7 @@ ENV PATH=$CONDA_DIR/bin:$PATH \ ADD fix-permissions /usr/local/bin/fix-permissions # Enable prompt color in the skeleton .bashrc before creating the default NB_USER -# and in the default bash.bashrc for the case where the user home directory gets -# overridden. -RUN sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc && \ - sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/bash.bashrc +RUN sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc # Create NB_USER wtih name jovyan user with UID=1000 and in the 'users' group # and make sure these dirs are writable by the `users` group.