Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ RUN set -ex && \
rm /bin/sh && \
ln -sv /bin/bash /bin/sh && \
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \
useradd -u ${spark_uid} spark && \
chgrp root /etc/passwd && chmod ug+rw /etc/passwd && \
rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

ARG base_img

# Specify the User that the actual main process will run as
ARG spark_uid=185

FROM $base_img
WORKDIR /

Expand All @@ -29,14 +32,13 @@ RUN mkdir ${SPARK_HOME}/R
RUN \
apt-get update && \
apt install -y r-base r-base-dev && \
rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/*
rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && \
useradd -u ${spark_uid} spark

COPY R ${SPARK_HOME}/R
ENV R_HOME /usr/lib/R

WORKDIR /opt/spark/work-dir
ENTRYPOINT [ "/opt/entrypoint.sh" ]

# Specify the User that the actual main process will run as
ARG spark_uid=185
USER ${spark_uid}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

ARG base_img

# Specify the User that the actual main process will run as
ARG spark_uid=185

FROM $base_img
WORKDIR /

Expand All @@ -28,14 +31,14 @@ RUN apt-get update && \
apt install -y python3 python3-pip && \
pip3 install --upgrade pip setuptools && \
# Removed the .cache to save space
rm -rf /root/.cache && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/*
rm -rf /root/.cache && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && \
# Add the spark user
useradd -u ${spark_uid} spark

COPY python/pyspark ${SPARK_HOME}/python/pyspark
COPY python/lib ${SPARK_HOME}/python/lib

WORKDIR /opt/spark/work-dir
ENTRYPOINT [ "/opt/entrypoint.sh" ]

# Specify the User that the actual main process will run as
ARG spark_uid=185
USER ${spark_uid}