You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@training.apache.org by cd...@apache.org on 2024/09/16 12:12:18 UTC
(incubator-training) 02/02: feat: Added a Dockerfile and docker-compose.yaml to build the project locally with only Docker as requirement.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-training.git
commit 9668ab6472abd4bddae3bc2c70a4b9f63f879efe
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Mon Sep 16 14:12:05 2024 +0200
feat: Added a Dockerfile and docker-compose.yaml to build the project locally with only Docker as requirement.
---
Dockerfile | 37 +++++++++++++++++++++++++++++++++++++
docker-compose.yaml | 31 +++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+)
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d302de6
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,37 @@
+# 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
+#
+# https://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.
+
+##########################################################################################
+# Build Apache Training
+##########################################################################################
+
+# Fixed version of this in order to have a fixed JDK version
+FROM azul/zulu-openjdk:21 as build
+
+# Install some stuff we need to run the build
+RUN apt update -y
+RUN apt install -y git graphviz nodejs npm wget bzip2 python3 python3-pip cargo
+RUN python3 -m pip install --upgrade pip setuptools seqdiag blockdiag actdiag nwdiag convert racks opc-diag
+#RUN npm install vega pango
+RUN wget -qO- https://get.haskellstack.org/ | sh
+RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
+RUN bunzip2 phantomjs-2.1.1-linux-x86_64.tar.bz2
+RUN tar -xvf phantomjs-2.1.1-linux-x86_64.tar
+
+# Required for running on Windows systems
+RUN apt install -y dos2unix
+
+# Change the working directory (where commands are executed) into the new "ws" directory
+WORKDIR /ws
\ No newline at end of file
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 0000000..8f68bc9
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,31 @@
+#
+# 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
+#
+# https://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.
+#
+
+version: "3.8"
+services:
+ builder:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ command: ["/ws/mvnw", "-e", "-Dskip-pgp-signing=true", "-Dmaven.repo.local=/ws/out/.repository", "clean", "install"]
+ volumes:
+ # Bind the local directory as "/ws"
+ - type: bind
+ source: .
+ target: /ws