File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,12 @@ CMD ["start.sh"]
129
129
# Copy local files as late as possible to avoid cache busting
130
130
COPY start.sh /usr/local/bin/
131
131
132
+ USER root
133
+
134
+ # Create dirs for startup hooks
135
+ RUN mkdir /usr/local/bin/start-notebook.d && \
136
+ mkdir /usr/local/bin/before-notebook.d
137
+
132
138
# Switch back to jovyan to avoid accidental container runs as root
133
139
USER ${NB_UID}
134
140
Original file line number Diff line number Diff line change @@ -20,25 +20,25 @@ run-hooks () {
20
20
if [[ ! -d " ${1} " ]] ; then
21
21
return
22
22
fi
23
- _log " ${0} : running hooks in ${1} as uid / gid : $( id -u) / $( id -g) "
23
+ _log " ${0} : running hooks in: ${1} as uid: $( id -u) gid: $( id -g) "
24
24
for f in " ${1} /" * ; do
25
25
case " ${f} " in
26
26
* .sh)
27
- _log " ${0} : running script ${f} "
27
+ _log " ${0} : sourcing shell script: ${f} "
28
28
# shellcheck disable=SC1090
29
29
source " ${f} "
30
30
;;
31
31
* )
32
32
if [[ -x " ${f} " ]] ; then
33
- _log " ${0} : running executable ${f} "
33
+ _log " ${0} : running executable: ${f} "
34
34
" ${f} "
35
35
else
36
- _log " ${0} : ignoring non-executable ${f} "
36
+ _log " ${0} : ignoring non-executable: ${f} "
37
37
fi
38
38
;;
39
39
esac
40
40
done
41
- _log " ${0} : done running hooks in ${1} "
41
+ _log " ${0} : done running hooks in: ${1} "
42
42
}
43
43
44
44
# A helper function to unset env vars listed in the value of the env var
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ RUN if [ -z "${scala_version}" ]; then \
57
57
ln -s "spark-${APACHE_SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala${scala_version}" "${SPARK_HOME}" ; \
58
58
fi && \
59
59
# Add a link in the before_notebook hook in order to source automatically PYTHONPATH && \
60
- mkdir -p /usr/local/bin/before-notebook.d && \
61
60
ln -s "${SPARK_HOME}/sbin/spark-config.sh" /usr/local/bin/before-notebook.d/spark-config.sh
62
61
63
62
# Configure IPython system-wide
You can’t perform that action at this time.
0 commit comments