From commits-return-46684-archive-asf-public=cust-asf.ponee.io@tomee.apache.org Wed Feb 20 21:29:26 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 76D7518075F for ; Wed, 20 Feb 2019 22:29:25 +0100 (CET) Received: (qmail 28700 invoked by uid 500); 20 Feb 2019 21:29:24 -0000 Mailing-List: contact commits-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tomee.apache.org Delivered-To: mailing list commits@tomee.apache.org Received: (qmail 28691 invoked by uid 99); 20 Feb 2019 21:29:24 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2019 21:29:24 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id DBCB08519A; Wed, 20 Feb 2019 21:29:23 +0000 (UTC) Date: Wed, 20 Feb 2019 21:29:23 +0000 To: "commits@tomee.apache.org" Subject: [tomee] branch master updated: Enhanced docker-compose.yml for non-root user build and debug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <155069816341.16587.4068462195776273963@gitbox.apache.org> From: jgallimore@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: tomee X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: fbd93bb0e901df5ef319e508d9139bfff5e9a032 X-Git-Newrev: dc3edcf444373ff0bb41bad49a36f881311b0f4f X-Git-Rev: dc3edcf444373ff0bb41bad49a36f881311b0f4f X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. jgallimore pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee.git The following commit(s) were added to refs/heads/master by this push: new dc3edcf Enhanced docker-compose.yml for non-root user build and debug new 102dc4b Merge pull request #401 from j4fm/Enhance-Docker-Compose dc3edcf is described below commit dc3edcf444373ff0bb41bad49a36f881311b0f4f Author: James Meen AuthorDate: Mon Feb 18 18:24:28 2019 +0000 Enhanced docker-compose.yml for non-root user build and debug --- docker-compose.yml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f1818c4..6399f3b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,22 +19,73 @@ version: '2' volumes: m2: services: - mvn: + # This service is a workaround to set volume permissions so that they are correct for non-root user build + volume_perms: + image: alpine + command: "chown -R 1000:1000 /var/maven" + volumes: + - m2:/var/maven/.m2 + # Build+test. Stops on first test failure + build: image: "maven:3.3.9-jdk-8" + command: ["-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "clean", "install"] entrypoint: "mvn" working_dir: /opt/project + user: 1000:1000 environment: - MAVEN_OPTS=-Xmx768m -XX:ReservedCodeCacheSize=64m -Xss2048k + - MAVEN_CONFIG=/var/maven/.m2 volumes: - - m2:/root/.m2 + - m2:/var/maven/.m2 - .:/opt/project - quickbuild: + depends_on: + - volume_perms + # Build+test. Does not stop on test failures + build-all: image: "maven:3.3.9-jdk-8" - command: ["mvn", "-Pquick", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "-DuniqueVersion=false", "-ff", "-Dassemble", "-DskipTests", "-DfailIfNoTests=false", "clean", "install"] + command: ["--fail-at-end", "-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "clean", "install"] + entrypoint: "mvn" working_dir: /opt/project + user: 1000:1000 + ports: + - 5005:5005 environment: - MAVEN_OPTS=-Xmx768m -XX:ReservedCodeCacheSize=64m -Xss2048k + - MAVEN_CONFIG=/var/maven/.m2 volumes: - - m2:/root/.m2 + - m2:/var/maven/.m2 - .:/opt/project - + depends_on: + - volume_perms + # Just build (no tests) + build-quick: + image: "maven:3.3.9-jdk-8" + 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 + user: 1000:1000 + environment: + - MAVEN_OPTS=-Xmx768m -XX:ReservedCodeCacheSize=64m -Xss2048k + - MAVEN_CONFIG=/var/maven/.m2 + volumes: + - m2:/var/maven/.m2 + - .:/opt/project + depends_on: + - volume_perms + # Build+test. Waits for debugger on port 5005. Stops on first test failure + debug: + image: "maven:3.3.9-jdk-8" + 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 + user: 1000:1000 + ports: + - 5005:5005 + environment: + - MAVEN_OPTS=-Xmx768m -XX:ReservedCodeCacheSize=64m -Xss2048k + - MAVEN_CONFIG=/var/maven/.m2 + volumes: + - m2:/var/maven/.m2 + - .:/opt/project + depends_on: + - volume_perms \ No newline at end of file