Skip to content

Commit

Permalink
Added pre-notebook hook to add notebook user extra group
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Levi committed Nov 11, 2021
1 parent 7a0d644 commit 243bb97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions allspark-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ RUN apt-get update && \
# I'm not sure this has any affect
COPY files/hdfs-site.xml /usr/local/spark/conf/hdfs-site.xml

# add-user-to-group.sh add the $NB_USER to group 50 (staff) used by RStudio
COPY files/add-user-to-group.sh /usr/local/bin/before-notebook.d/

# Install pythong packages
# - pip - python package manager
# - boto3 - python AWS library
Expand All @@ -47,8 +50,5 @@ RUN pip install --upgrade \
dataengineeringutils3==1.3.0 \
etl-manager==7.4.0

# Add user to groups used by RStudio
RUN usermod -a -G "staff,users" "${NB_USER}"

# Vi just doesn't cut it for some people
RUN update-alternatives --set editor /bin/nano-tiny
3 changes: 3 additions & 0 deletions allspark-notebook/files/add-user-to-group.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

usermod -a -G 50 "${NB_USER}"

0 comments on commit 243bb97

Please sign in to comment.