Dockerfile 1.1 KB

123456789101112131415
  1. FROM openjdk:8-jre
  2. WORKDIR /opt/cluster
  3. RUN echo "deb http://mirror.nju.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list && \
  4. echo "deb http://mirror.nju.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
  5. echo "deb http://mirror.nju.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \
  6. echo "deb http://mirror.nju.edu.cn/debian-security bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
  7. apt update && apt install -y krb5-user && mkdir conf && \
  8. curl -fL http://mirror.nju.edu.cn/apache/hadoop/common/hadoop-3.2.3/hadoop-3.2.3.tar.gz -o hadoop.tar.gz && \
  9. tar -xf hadoop.tar.gz && mv hadoop-3.2.3 hadoop && rm hadoop.tar.gz && \
  10. curl -fL http://mirror.nju.edu.cn/apache/spark/spark-3.0.3/spark-3.0.3-bin-hadoop3.2.tgz -o spark.tgz && \
  11. tar -xf spark.tgz && mv spark-3.0.3-bin-hadoop3.2 spark && rm spark.tgz
  12. ENV HADOOP_HOME=/opt/cluster/hadoop
  13. ENV HADOOP_CONF_DIR=/opt/cluster/conf
  14. ENV SPARK_HOME=/opt/cluster/spark
  15. ENV SPARK_CONF_DIR=/opt/cluster/conf