diff --git a/Bigdata/storm/2.8.2/24.03-lts-sp1/Dockerfile b/Bigdata/storm/2.8.2/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f6376b17c6dd226b6c28f6d48ec61863743f5c5d --- /dev/null +++ b/Bigdata/storm/2.8.2/24.03-lts-sp1/Dockerfile @@ -0,0 +1,32 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 +FROM $BASE + +ARG VERSION=2.8.2 +ARG GOSU_VERSION=1.17 +ARG TARGETARCH + +RUN curl -fSL -o storm.tar.gz https://archive.apache.org/dist/storm/apache-storm-${VERSION}/apache-storm-${VERSION}.tar.gz; \ + mkdir -p /usr/local/storm && \ + tar -zxf storm.tar.gz -C /usr/local/storm --strip-components=1 && \ + rm -rf storm.tar.gz && \ + curl -fSL -o /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${TARGETARCH}.asc" && \ + curl -fSL -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${TARGETARCH}" && \ + chmod +x /usr/local/bin/gosu.asc && \ + chmod +x /usr/local/bin/gosu + +ENV PATH=$PATH:/usr/local/storm/bin +ENV STORM_CONF_DIR=/conf +ENV STORM_DATA_DIR=/data +ENV STORM_LOG_DIR=/logs +COPY entrypoint.sh / +RUN yum install -y java-17-openjdk-devel shadow-utils && \ + yum clean all && \ + chmod +x /entrypoint.sh && \ + groupadd -r storm --gid=1000; \ + useradd -r -g storm --uid=1000 storm; \ + mkdir -p "$STORM_CONF_DIR" "$STORM_DATA_DIR" "$STORM_LOG_DIR"; \ + chown -R storm:storm "$STORM_CONF_DIR" "$STORM_DATA_DIR" "$STORM_LOG_DIR" + +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk +WORKDIR /usr/local/storm/ +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/Bigdata/storm/2.8.2/24.03-lts-sp1/entrypoint.sh b/Bigdata/storm/2.8.2/24.03-lts-sp1/entrypoint.sh new file mode 100644 index 0000000000000000000000000000000000000000..b4dfa6d56bd52d8762cce65db1dc039437e33e30 --- /dev/null +++ b/Bigdata/storm/2.8.2/24.03-lts-sp1/entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +# Allow the container to be started with `--user` +if [ "$1" = 'storm' -a "$(id -u)" = '0' ]; then + chown -R storm:storm "$STORM_CONF_DIR" "$STORM_DATA_DIR" "$STORM_LOG_DIR" + exec gosu storm "$0" "$@" +fi + +# Generate the config only if it doesn't exist +CONFIG="$STORM_CONF_DIR/storm.yaml" +if [ ! -f "$CONFIG" ]; then + cat << EOF > "$CONFIG" +storm.zookeeper.servers: [zookeeper] +nimbus.seeds: [nimbus] +storm.log.dir: "$STORM_LOG_DIR" +storm.local.dir: "$STORM_DATA_DIR" +EOF +fi + +exec "$@" \ No newline at end of file diff --git a/Bigdata/storm/meta.yml b/Bigdata/storm/meta.yml index b44264fd18f3920415399ce028e37044ae84d4eb..14afa2c3cf8114aebcc0ff3ec6ff406570320123 100644 --- a/Bigdata/storm/meta.yml +++ b/Bigdata/storm/meta.yml @@ -1,2 +1,4 @@ 2.8.0-oe2403sp1: - path: 2.8.0/24.03-lts-sp1/Dockerfile \ No newline at end of file + path: 2.8.0/24.03-lts-sp1/Dockerfile +2.8.2-oe2403sp1: + path: 2.8.2/24.03-lts-sp1/Dockerfile \ No newline at end of file