This is an automated email from the ASF dual-hosted git repository. rzo1 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/storm-docker.git
The following commit(s) were added to refs/heads/master by this push: new d1f8af2 Storm 2.6.1 d1f8af2 is described below commit d1f8af26ccf800531cc773a39fac9e30efa94bca Author: Richard Zowalla <r...@apache.org> AuthorDate: Fri Feb 2 13:13:53 2024 +0100 Storm 2.6.1 --- 2.6.1/Dockerfile | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 2.6.1/docker-entrypoint.sh | 22 +++++++++++ 2 files changed, 116 insertions(+) diff --git a/2.6.1/Dockerfile b/2.6.1/Dockerfile new file mode 100644 index 0000000..9f4da5e --- /dev/null +++ b/2.6.1/Dockerfile @@ -0,0 +1,94 @@ +FROM eclipse-temurin:11-jre + +ENV STORM_CONF_DIR=/conf \ + STORM_DATA_DIR=/data \ + STORM_LOG_DIR=/logs + +# Add a user with an explicit UID/GID and create necessary directories +RUN set -eux; \ + 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"`` + +# Install required packages +RUN set -eux; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive \ + apt-get install -y --no-install-recommends \ + bash \ + ca-certificates \ + dirmngr \ + gosu \ + gnupg \ + python3 \ + procps \ + wget; \ + rm -rf /var/lib/apt/lists/*; \ +# Verify that gosu binary works + gosu nobody true + +ARG DISTRO_NAME=apache-storm-2.6.1 + + +# Download Apache Storm, verify its PGP signature, untar and clean up +RUN set -eux; \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget -q -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ + # Generated via automation/create-key-section.sh + importKeys() { \ + for key in \ + # Meng Li (Ethan Li CODE SIGNING KEY) <etha...@apache.org> + 5167DE337E7370373499FC1DA4A672F11B5050C8 \ + # Kishorkumar Vasantrao Patil (CODE SIGNING KEY) <kishorvpa...@apache.org> + 32C8C0BEE3D01AF46B6E24B0AC30BFA8FEF0711F \ + # Govind Rajagopal Menon (Release Signing Key) <gov...@apache.org> + 79B03D059E628478FC9F1D8B152CAD0C46E87B61 \ + # Bipin Prasad (For Signing Apache Storm release) <bipinpra...@apache.org> + 51379DA8A7AE5B02674EF15C134716AF768D9B6E \ + # Aaron Gresch <agre...@apache.org> + DA903F2CF9BBD42EAECFA9E45EA6FAEF09A4474D \ + # Kishor Patil (The keys for signing Storm releases) <kishorvpa...@apache.org> + 6156BAC0C21A1991CF1B690AB2973D6F4A67943A \ + # Richard Zowalla (Code Signing Key) <r...@apache.org> + B83D15E72253ED1104EB4FBBDAB472F0E5B8A431 \ + # Richard Zowalla (GitHub) <r...@apache.org> + 339F3B2F72129ABCA81D96DA91EA7956A2DAD9CE \ + ; do \ + gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys "$key" || \ + gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \ + gpg --batch --keyserver hkps://pgp.mit.edu --recv-keys "$key" || \ + gpg --batch --keyserver hkps://keyserver.pgp.com --recv-keys "$key" ; \ + done; \ + }; \ + ddist "$DISTRO_NAME.tar.gz" "storm/$DISTRO_NAME/$DISTRO_NAME.tar.gz"; \ + ddist "$DISTRO_NAME.tar.gz.asc" "storm/$DISTRO_NAME/$DISTRO_NAME.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + importKeys; \ + gpg --batch --verify "$DISTRO_NAME.tar.gz.asc" "$DISTRO_NAME.tar.gz"; \ + tar -xzf "$DISTRO_NAME.tar.gz"; \ + rm -rf "$GNUPGHOME" "$DISTRO_NAME.tar.gz" "$DISTRO_NAME.tar.gz.asc"; \ + chown -R storm:storm "$DISTRO_NAME" + +WORKDIR $DISTRO_NAME + +ENV PATH $PATH:/$DISTRO_NAME/bin + +COPY docker-entrypoint.sh / +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/2.6.1/docker-entrypoint.sh b/2.6.1/docker-entrypoint.sh new file mode 100755 index 0000000..66dff6f --- /dev/null +++ b/2.6.1/docker-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 "$@"