Commit 65ac29a3 by amir

base docker for java ms changes, add archios

parent 930c8f8f
FROM drissamri/java:jre8
#FROM registry.ng.bluemix.net/ibmliberty
RUN mkdir -p /logs/conf
COPY src/log4j.xml /logs/conf/
COPY src/run.sh /usr/
RUN chmod +x /usr/run.sh
WORKDIR /usr
#EXPOSE 8000
#ENTRYPOINT ["/usr/run.sh","/usr/GroupService.jar"]
# for debugging add -e USE_DEBUG and add -p 8000:8000 to run params
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true"
xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
</layout>
</appender>
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="false" />
<param name="maxFileSize" value="10MB" />
<param name="maxBackupIndex" value="10" />
<param name="file" value="/var/log/mcx/msApp.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<!--<appender-ref ref="console" />-->
<appender-ref ref="file" />
</root>
</log4j:configuration>
#!/bin/sh
docker run -e IPG_ENV_PARAMS=-Dds.IpAddress=172.16.1.97:8080 -p 9090:9090 172.16.1.132:5000/ipgallery/group-service
# with debug
#docker run -e USE_DEBUG -e IPG_ENV_PARAMS=-Dds.IpAddress=172.16.1.97:8080 -p 9090:9090 172.16.1.132:5000/ipgallery/group-service
#! /bin/sh
IPG_ENV_PARAMS_DELIM=`echo $IPG_ENV_PARAMS | awk '{gsub(/#/," ");print}'`
#add config file location if not defined
if test -n "$configFile.location"; then
echo "add config file";
IPG_ENV_PARAMS_DELIM=${IPG_ENV_PARAMS_DELIM}" -DconfigFile.location=/opt/mcx/config/config.properties"
fi
#add archaius.configurationSource.additionalUrls if not defined
if test -n "$archaius.configurationSource.additionalUrls"; then
echo "add archaius config file";
IPG_ENV_PARAMS_DELIM=${IPG_ENV_PARAMS_DELIM}" -Darchaius.configurationSource.additionalUrls=file:///opt/mcx/config/config.properties"
fi
if test -n "${USE_DEBUG}"; then
echo "debug on";
IPG_ENV_PARAMS_DELIM=${IPG_ENV_PARAMS_DELIM}" -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
else
echo "debug off";
fi
echo "params are: " ${IPG_ENV_PARAMS_DELIM}
exec java ${IPG_ENV_PARAMS_DELIM} -jar $1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment