You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rz...@apache.org on 2024/03/31 09:56:53 UTC
(tomee) 02/02: TOMEE-4314 - Fix docker-compose.yml to build TomEE inside a docker container. Adds profiles to distinguish between different build flavours
This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 27bddf3a6e407e0da5b9eedaa23c48c59b6872e0
Author: Richard Zowalla <rz...@apache.org>
AuthorDate: Sun Mar 31 11:56:32 2024 +0200
TOMEE-4314 - Fix docker-compose.yml to build TomEE inside a docker container. Adds profiles to distinguish between different build flavours
---
README.adoc | 10 ++++++++++
docker-compose.yml | 12 ++++++++----
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/README.adoc b/README.adoc
index 08d6851178..a36fd97dc0 100644
--- a/README.adoc
+++ b/README.adoc
@@ -103,6 +103,16 @@ execute:
mvn clean install -pl maven/tomee-embedded-maven-plugin -am -Dmaven.test.skip=true
....
+=== Build with Docker
+
+There is also a `docker-compose.yml` available to build TomEE with several profiles. For a quick build without tests, you can run
+
+```
+docker compose --profile build-quick up
+```
+
+on the project root. There are additional profiles available, e.g. for attaching with a debugger or running a full build.
+
=== Contributing
The http://tomee.apache.org/community/index.html[community] section from
diff --git a/docker-compose.yml b/docker-compose.yml
index 6399f3bbda..f018e11441 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -27,7 +27,8 @@ services:
- m2:/var/maven/.m2
# Build+test. Stops on first test failure
build:
- image: "maven:3.3.9-jdk-8"
+ image: "maven:3-eclipse-temurin-11"
+ profiles: ["build"]
command: ["-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project
@@ -42,7 +43,8 @@ services:
- volume_perms
# Build+test. Does not stop on test failures
build-all:
- image: "maven:3.3.9-jdk-8"
+ image: "maven:3-eclipse-temurin-11"
+ profiles: ["build-all"]
command: ["--fail-at-end", "-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project
@@ -59,7 +61,8 @@ services:
- volume_perms
# Just build (no tests)
build-quick:
- image: "maven:3.3.9-jdk-8"
+ image: "maven:3-eclipse-temurin-11"
+ profiles: ["build-quick"]
command: ["-Duser.home=/var/maven", "-Pquick", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "-DuniqueVersion=false", "-ff", "-Dassemble", "-DskipTests", "-DfailIfNoTests=false", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project
@@ -74,7 +77,8 @@ services:
- volume_perms
# Build+test. Waits for debugger on port 5005. Stops on first test failure
debug:
- image: "maven:3.3.9-jdk-8"
+ image: "maven:3-eclipse-temurin-11"
+ profiles: ["build-debug"]
command: ["-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "-Dopenejb.server.debug", "-Dmaven.surefire.debug", "-Dopenejb.arquillian.debug=true", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project