From 3ed7465c5f72efd24aaf401ed3257aa2a1f4196e Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 26 Sep 2018 17:19:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0docker=20build-time=20argumen?= =?UTF-8?q?ts=20(environment=20/=20profile)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wildfly_tml_khhw/Dockerfile | 7 ++++++- wildfly_tml_txgw/Dockerfile | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/wildfly_tml_khhw/Dockerfile b/wildfly_tml_khhw/Dockerfile index ef85856..f6e0897 100644 --- a/wildfly_tml_khhw/Dockerfile +++ b/wildfly_tml_khhw/Dockerfile @@ -1,8 +1,13 @@ ARG BASE_IMAGE=khhwtml02t.wanhai.com:8182/jboss/wildfly-tml:latest FROM $BASE_IMAGE +#set profile(sat/uat/production) +ARG profile +#sel environment (khhw/txgw/tyow) +ARG environment + #set environment -ENV JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+UseParallelGC -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=KHHW -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=$profile" +ENV JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+UseParallelGC -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=${environment} -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=${profile}" #prepare tmp dir COPY --chown=jboss . ${JBOSS_HOME}/config diff --git a/wildfly_tml_txgw/Dockerfile b/wildfly_tml_txgw/Dockerfile index 109bb83..f6e0897 100644 --- a/wildfly_tml_txgw/Dockerfile +++ b/wildfly_tml_txgw/Dockerfile @@ -1,8 +1,13 @@ ARG BASE_IMAGE=khhwtml02t.wanhai.com:8182/jboss/wildfly-tml:latest FROM $BASE_IMAGE +#set profile(sat/uat/production) +ARG profile +#sel environment (khhw/txgw/tyow) +ARG environment + #set environment -ENV JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+UseParallelGC -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=TXGW -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=$profile" +ENV JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+UseParallelGC -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true -Dcom.wanhai.tml.yard.current=${environment} -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=${profile}" #prepare tmp dir COPY --chown=jboss . ${JBOSS_HOME}/config