Skip to content

Commit 8c71fc5

Browse files
committed
Fix dockerfile
1 parent 6fa1c2c commit 8c71fc5

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

etc/docker/demo-base/Dockerfile

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ ARG NB_GID="100"
99

1010
USER root
1111

12-
ENV HADOOP_HOME=/usr/hdp/current/hadoop \
13-
ANACONDA_HOME=/opt/conda
14-
15-
ENV SHELL=/bin/bash \
16-
NB_USER=$NB_USER \
17-
NB_UID=$NB_UID \
18-
NB_GID=$NB_GID \
19-
LC_ALL=en_US.UTF-8 \
20-
LANG=en_US.UTF-8 \
21-
LANGUAGE=en_US.UTF-8 \
22-
JAVA_HOME=/usr/lib/jvm/java \
23-
SPARK_HOME=/usr/hdp/current/spark2-client \
24-
PYSPARK_PYTHON=$ANACONDA_HOME/bin/python \
25-
HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
26-
27-
ENV HOME=/home/$NB_USER \
28-
PATH=$JAVA_HOME/bin:$ANACONDA_HOME/bin:$HADOOP_HOME/bin:$SPARK_HOME/bin:$PATH
12+
ENV HADOOP_HOME /usr/hdp/current/hadoop
13+
ENV ANACONDA_HOME /opt/conda
14+
15+
ENV SHELL /bin/bash \
16+
NB_USER $NB_USER \
17+
NB_UID $NB_UID \
18+
NB_GID $NB_GID \
19+
LC_ALL en_US.UTF-8 \
20+
LANG en_US.UTF-8 \
21+
LANGUAGE en_US.UTF-8 \
22+
JAVA_HOME /usr/lib/jvm/java \
23+
SPARK_HOME /usr/hdp/current/spark2-client \
24+
PYSPARK_PYTHON $ANACONDA_HOME/bin/python \
25+
HADOOP_CONF_DIR $HADOOP_HOME/etc/hadoop
26+
27+
ENV HOME /home/$NB_USER
28+
ENV PATH $JAVA_HOME/bin:$ANACONDA_HOME/bin:$HADOOP_HOME/bin:$SPARK_HOME/bin:$PATH
2929

3030
ENV SPARK_VER $SPARK_VERSION
3131
ENV HADOOP_VER 3.3.1
@@ -56,7 +56,7 @@ RUN dpkg --purge --force-depends ca-certificates-java \
5656
&& apt-add-repository 'deb http://security.debian.org/debian-security bullseye-security main' \
5757
&& apt-add-repository 'deb http://deb.debian.org/debian/ sid main' \
5858
&& apt-get update && apt-get install -yq --no-install-recommends \
59-
openjdk-8-jre-headless \
59+
openjdk-8-jdk-headless \
6060
ca-certificates-java \
6161
&& apt-get clean \
6262
&& rm -rf /var/lib/apt/lists/*
@@ -71,14 +71,14 @@ ADD fix-permissions /usr/local/bin/fix-permissions
7171
# and make sure these dirs are writable by the `users` group.
7272
RUN groupadd wheel -g 11 && \
7373
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \
74-
useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
74+
useradd -m -s /bin/bash -N -u "$NB_UID" "$NB_USER" && \
7575
mkdir -p /usr/hdp/current && \
7676
mkdir -p /usr/local/share/jupyter && \
77-
chown $NB_USER:$NB_GID $ANACONDA_HOME && \
77+
chown "$NB_USER":"$NB_GID" "$ANACONDA_HOME" && \
7878
chmod g+w /etc/passwd && \
7979
chmod +x /usr/local/bin/fix-permissions && \
80-
fix-permissions $HOME && \
81-
fix-permissions $ANACONDA_HOME && \
80+
fix-permissions "$HOME" && \
81+
fix-permissions "$ANACONDA_HOME" && \
8282
fix-permissions /usr/hdp/current && \
8383
fix-permissions /usr/local/share/jupyter
8484

@@ -90,8 +90,8 @@ RUN useradd -m -s /bin/bash -N -u 1111 elyra && \
9090
USER $NB_UID
9191

9292
# Setup work directory for backward-compatibility
93-
RUN mkdir /home/$NB_USER/work && \
94-
fix-permissions /home/$NB_USER
93+
RUN mkdir "/home/$NB_USER/work" && \
94+
fix-permissions "/home/$NB_USER"
9595

9696
# DOWNLOAD HADOOP AND SPARK
9797
RUN curl -sL https://archive.apache.org/dist/hadoop/common/hadoop-$HADOOP_VER/hadoop-$HADOOP_VER.tar.gz | tar -xz -C /usr/hdp/current
@@ -109,8 +109,8 @@ RUN conda install mamba -n base -c conda-forge && \
109109
'r-argparse' \
110110
'python=3.10' && \
111111
mamba clean -y --all &&\
112-
fix-permissions $ANACONDA_HOME && \
113-
fix-permissions /home/$NB_USER
112+
fix-permissions "$ANACONDA_HOME" && \
113+
fix-permissions "/home/$NB_USER"
114114

115115
USER $NB_UID
116116

@@ -142,8 +142,8 @@ RUN cd /tmp && \
142142
pip install /tmp/toree-0.5.0.tar.gz && \
143143
jupyter toree install --spark_home=$SPARK_HOME --kernel_name="Spark $SPARK_VER" --interpreters=Scala && \
144144
rm -f /tmp/toree-0.5.0.tar.gz && \
145-
fix-permissions $ANACONDA_HOME && \
146-
fix-permissions /home/$NB_USER
145+
fix-permissions "$ANACONDA_HOME" && \
146+
fix-permissions "/home/$NB_USER"
147147

148148
# SETUP PASSWORDLESS SSH FOR $NB_USER
149149
RUN ssh-keygen -q -N "" -t rsa -f /home/$NB_USER/.ssh/id_rsa && \

etc/docker/demo-base/fix-permissions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ set -e
2020
for d in "$@"; do
2121
find "$d" \
2222
! \( \
23-
-group $NB_GID \
23+
-group "$NB_GID" \
2424
-a -perm -g+rwX \
2525
\) \
26-
-exec chgrp $NB_GID {} \; \
26+
-exec chgrp "$NB_GID" {} \; \
2727
-exec chmod g+rwX {} \;
2828
# setuid,setgid *on directories only*
2929
find "$d" \

etc/docker/enterprise-gateway-demo/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ FROM $BASE_CONTAINER
1010
# use an ARG instruction without a value inside of a build stage:
1111
ARG SPARK_VERSION
1212

13-
ENV NB_USER="jovyan"
14-
ENV SPARK_VER=${SPARK_VERSION}
13+
ENV NB_USER "jovyan"
14+
ENV SPARK_VER ${SPARK_VERSION}
1515

1616
USER $NB_USER
1717

etc/docker/kernel-py/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ARG BASE_CONTAINER=jupyter/scipy-notebook:2023-03-13
33
FROM $BASE_CONTAINER
44

5-
ENV PATH=$PATH:$CONDA_DIR/bin
5+
ENV PATH $PATH:$CONDA_DIR/bin
66

77
# Add debugger support
88
RUN pip install --upgrade ipykernel

0 commit comments

Comments
 (0)