78 lines
5.0 KiB
Docker
78 lines
5.0 KiB
Docker
FROM docker.io/bitnami/minideb:bullseye
|
|
|
|
ARG JAVA_EXTRA_SECURITY_DIR="/bitnami/java/extra-security"
|
|
ARG TARGETARCH
|
|
|
|
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
|
|
org.opencontainers.image.description="Application packaged by Bitnami" \
|
|
org.opencontainers.image.ref.name="3.3.0-debian-11-r34" \
|
|
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/spark" \
|
|
org.opencontainers.image.title="spark" \
|
|
org.opencontainers.image.vendor="VMware, Inc." \
|
|
org.opencontainers.image.version="3.3.0"
|
|
|
|
ENV HOME="/" \
|
|
OS_ARCH="${TARGETARCH:-amd64}" \
|
|
OS_FLAVOUR="debian-11" \
|
|
OS_NAME="linux" \
|
|
PATH="/opt/bitnami/python/bin:/opt/bitnami/java/bin:/opt/bitnami/spark/bin:/opt/bitnami/spark/sbin:/opt/bitnami/common/bin:$PATH"
|
|
|
|
COPY prebuildfs /
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
# Install required system packages and dependencies
|
|
RUN install_packages ca-certificates curl libbz2-1.0 libc6 libcom-err2 libcrypt1 libffi7 libgcc-s1 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblzma5 libncursesw6 libnsl2 libreadline8 libsqlite3-0 libssl1.1 libstdc++6 libtinfo6 libtirpc3 procps zlib1g
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f python-3.8.14-1-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/python-3.8.14-1-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/python-3.8.14-1-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
|
|
fi && \
|
|
sha256sum -c python-3.8.14-1-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
|
|
tar -zxf python-3.8.14-1-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf python-3.8.14-1-linux-${OS_ARCH}-debian-11.tar.gz python-3.8.14-1-linux-${OS_ARCH}-debian-11.tar.gz.sha256
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f java-1.8.345-2-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/java-1.8.345-2-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/java-1.8.345-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
|
|
fi && \
|
|
sha256sum -c java-1.8.345-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
|
|
tar -zxf java-1.8.345-2-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf java-1.8.345-2-linux-${OS_ARCH}-debian-11.tar.gz java-1.8.345-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f spark-3.3.0-6-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/spark-3.3.0-6-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/spark-3.3.0-6-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
|
|
fi && \
|
|
sha256sum -c spark-3.3.0-6-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
|
|
tar -zxf spark-3.3.0-6-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf spark-3.3.0-6-linux-${OS_ARCH}-debian-11.tar.gz spark-3.3.0-6-linux-${OS_ARCH}-debian-11.tar.gz.sha256
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
|
|
fi && \
|
|
sha256sum -c gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
|
|
tar -zxf gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz gosu-1.14.0-154-linux-${OS_ARCH}-debian-11.tar.gz.sha256
|
|
RUN apt-get update && apt-get upgrade -y && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
|
|
RUN chmod g+rwX /opt/bitnami
|
|
RUN chown -R 1001:root /opt/bitnami/spark
|
|
|
|
COPY rootfs /
|
|
RUN /opt/bitnami/scripts/spark/postunpack.sh
|
|
RUN /opt/bitnami/scripts/java/postunpack.sh
|
|
ENV APP_VERSION="3.3.0" \
|
|
BITNAMI_APP_NAME="spark" \
|
|
JAVA_HOME="/opt/bitnami/java" \
|
|
LD_LIBRARY_PATH="/opt/bitnami/python/lib/:/opt/bitnami/spark/venv/lib/python3.8/site-packages/numpy.libs/:$LD_LIBRARY_PATH" \
|
|
LIBNSS_WRAPPER_PATH="/opt/bitnami/common/lib/libnss_wrapper.so" \
|
|
NSS_WRAPPER_GROUP="/opt/bitnami/spark/tmp/nss_group" \
|
|
NSS_WRAPPER_PASSWD="/opt/bitnami/spark/tmp/nss_passwd" \
|
|
PYTHONPATH="/opt/bitnami/spark/python/:$PYTHONPATH" \
|
|
SPARK_HOME="/opt/bitnami/spark"
|
|
|
|
WORKDIR /opt/bitnami/spark
|
|
USER 1001
|
|
ENTRYPOINT [ "/opt/bitnami/scripts/spark/entrypoint.sh" ]
|
|
CMD [ "/opt/bitnami/scripts/spark/run.sh" ]
|