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.git
The following commit(s) were added to refs/heads/master by this push:
new aacf03943 STORM-4056 - Implement a docker-based alternativ to build
with -Pnative on MacOS
aacf03943 is described below
commit aacf03943afb1b96c8c51eaec56c5c2a6330e431
Author: Richard Zowalla <[email protected]>
AuthorDate: Tue Nov 12 16:13:12 2024 +0100
STORM-4056 - Implement a docker-based alternativ to build with -Pnative on
MacOS
---
.gitignore | 6 +++++-
dev-tools/docker/Dockerfile | 50 +++++++++++++++++++++++++++++++++++++++++++++
dev-tools/docker/README.md | 30 +++++++++++++++++++++++++++
3 files changed, 85 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 2a2c0f71a..3786af5c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,4 +59,8 @@ hs_err_pid*
# Test jars for zip slip
!/storm-server/src/test/resources/evil-path-traversal.jar
-!/storm-server/src/test/resources/evil-path-traversal-resources.jar
\ No newline at end of file
+!/storm-server/src/test/resources/evil-path-traversal-resources.jar
+
+m2
+install.txt
+install-shade.txt
\ No newline at end of file
diff --git a/dev-tools/docker/Dockerfile b/dev-tools/docker/Dockerfile
new file mode 100644
index 000000000..0a61ac33c
--- /dev/null
+++ b/dev-tools/docker/Dockerfile
@@ -0,0 +1,50 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+FROM ubuntu:latest
+
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends \
+ curl \
+ wget \
+ git \
+ bash \
+ unzip \
+ ca-certificates \
+ autoconf \
+ automake \
+ libssl-dev libtool pkg-config \
+ ruby ruby-dev \
+ python3.10 pip \
+ openjdk-17-jdk \
+ build-essential && \
+ rm -rf /var/lib/apt/lists/*
+
+# Install Node.js 20.x
+RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
+ apt-get install -y nodejs && \
+ npm install -g npm@latest
+
+# Set up Maven
+ARG MAVEN_VERSION=3.9.9
+RUN wget
https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.zip
&& \
+ unzip apache-maven-${MAVEN_VERSION}-bin.zip -d /opt && \
+ ln -s /opt/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/bin/mvn && \
+ rm apache-maven-${MAVEN_VERSION}-bin.zip
+
+# Set environment variables for Maven and Java
+ENV MAVEN_HOME=/opt/apache-maven-${MAVEN_VERSION}
+ENV PATH="${MAVEN_HOME}/bin:${PATH}"
+
+USER ubuntu
\ No newline at end of file
diff --git a/dev-tools/docker/README.md b/dev-tools/docker/README.md
new file mode 100644
index 000000000..0405fa9b4
--- /dev/null
+++ b/dev-tools/docker/README.md
@@ -0,0 +1,30 @@
+# Apache Storm Development Dockerfile
+
+This Dockerfile provides a complete development environment for Apache Storm,
aligning with the GitHub Actions CI setup
+for building and testing various modules of Apache Storm.
+
+It installs and configures Java, Maven, Python, Node.js, and Ruby, allowing
you to run builds and tests for different Storm modules in a containerized
environment.
+
+This is especially useful for people on Mac OSX or Windows. It also provides a
consistent environment for all developers.
+
+## Usage
+
+Build it by running:
+
+```bash
+docker build -t storm-dev .
+```
+
+## Run a build
+
+```bash
+docker run -it \
+--name storm-dev \
+-e MAVEN_OPTS="-Xmx768m -XX:ReservedCodeCacheSize=64m -Xss2048k" \
+-v $(pwd)/m2:/home/ubuntu/.m2 \
+-v $(pwd):/opt/project \
+-w /opt/project \
+storm-dev
+```
+
+Advanced cases such as remote debugging are also possible. Just map the
debugger port and start maven accordingly.
\ No newline at end of file