diff --git a/Dockerfile b/Dockerfile index df5eac8..74f6be4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,9 @@ ENV PATH="$HASPARK_PATH:$PATH" \ # 以免Spark或Hadoop找不到Hadoop Native Library LD_LIBRARY_PATH="$HASPARK_LD_LIBRARY_PATH:$LD_LIBRARY_PATH" \ # 临时密码文件路径加入环境变量 - TEMP_PASS_FILE="/root/temp.pass" + TEMP_PASS_FILE="/root/temp.pass" \ + # 保留 Bitnami 的环境变量 + BITNAMI_PATHS="/opt/bitnami/python/bin:/opt/bitnami/java/bin:/opt/bitnami/spark/bin:/opt/bitnami/spark/sbin" # 以下是一些环境变量默认值,用于Hadoop初始化 ENV HADOOP_LAUNCH_MODE="general" \ HADOOP_HDFS_REPLICATION="2" \ @@ -60,6 +62,8 @@ COPY resources/sources.list /tmp/sources.list # 将路径环境变量写入/etc/profile.d/path_env.sh RUN echo -e "#!/bin/bash\nexport PATH=$HASPARK_PATH:\$PATH\nexport LD_LIBRARY_PATH=$HASPARK_LD_LIBRARY_PATH:\$LD_LIBRARY_PATH" > /etc/profile.d/path_env.sh && \ + # 将Bitnami环境变量写入/etc/profile.d/bitnami.sh + echo -e "#!/bin/bash\nexport PATH=$BITNAMI_PATHS:\$PATH" > /etc/profile.d/bitnami.sh && \ # 将Hadoop部分环境变量写入/etc/profile.d/hadoop.sh echo -e "#!/bin/bash\nexport HADOOP_HOME=$HADOOP_HOME\nexport HADOOP_CONF_DIR=$HADOOP_CONF_DIR\nexport HADOOP_LOG_DIR=$HADOOP_LOG_DIR\nexport HADOOP_VER=$HADOOP_VER" >> /etc/profile.d/hadoop.sh && \ # 将Zookeeper部分环境变量写入/etc/profile.d/zookeeper.sh diff --git a/README.md b/README.md index 4285f29..4be6c91 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ version: '3' services: haspark-main: - image: somebottle/haspark:3.1.5 + image: somebottle/haspark:3.1.6 hostname: shmain env_file: ./conf.env environment: @@ -184,7 +184,7 @@ services: - '9870:9870' - '19888:19888' haspark-worker-1: - image: somebottle/haspark:3.1.5 + image: somebottle/haspark:3.1.6 hostname: shworker1 env_file: ./conf.env environment: @@ -200,7 +200,7 @@ services: ports: - '8081:8081' haspark-worker-2: - image: somebottle/haspark:3.1.5 + image: somebottle/haspark:3.1.6 hostname: shworker2 env_file: ./conf.env environment: diff --git a/docker-compose.yml b/docker-compose.yml index 2eb1b8f..d57b132 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: haspark-main: - image: somebottle/haspark:3.1.5 + image: somebottle/haspark:3.1.6 hostname: shmain env_file: ./conf.env environment: @@ -20,7 +20,7 @@ services: - '9870:9870' - '19888:19888' haspark-worker-1: - image: somebottle/haspark:3.1.5 + image: somebottle/haspark:3.1.6 hostname: shworker1 env_file: ./conf.env environment: @@ -36,7 +36,7 @@ services: ports: - '8081:8081' haspark-worker-2: - image: somebottle/haspark:3.1.5 + image: somebottle/haspark:3.1.6 hostname: shworker2 env_file: ./conf.env environment: