-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodel_rmi_launcher
More file actions
32 lines (32 loc) · 2.05 KB
/
model_rmi_launcher
File metadata and controls
32 lines (32 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM openjdk:8
# Required jars
ADD ./ngat_new_oss.jar ngat_new_oss.jar
ADD ./ngat_astrometry.jar ngat_astrometry.jar
ADD ./ngat_new_icm.jar ngat_new_icm.jar
ADD ./ngat_new_phase2.jar ngat_new_phase2.jar
ADD ./ngat_new_tcm.jar ngat_new_tcm.jar
ADD ./ngat_util.jar ngat_util.jar
ADD ./log4j-1.2.13.jar log4j-1.2.13.jar
# Select which connector to use based on which mysql database you are talking to:
# Also change the CLASSPATH environment later on in this file
# Currently used for the currently installed mysql (mysql-5.1.35-linux-i686-glibc23) on the oss machine
#ADD ./mysql-connector-java-3.1.12-bin.jar mysql-connector-java-3.1.12-bin.jar
# Latest mysql connector from https://dev.mysql.com/downloads/connector/j/
ADD ./mysql-connector-j-9.3.0.jar mysql-connector-j-9.3.0.jar
# Config files:
# /oss/oss/config/oss.properties
# See ../resources/config for example oss.properties
RUN mkdir -p /oss/oss/config
ADD oss.properties.docker /oss/oss/config/oss.properties
# /oss/tmp/policy.dat
RUN mkdir -p /oss/tmp
ADD ./policy.dat /oss/tmp/policy.dat
# Setup CLASSPATH
#ENV CLASSPATH="ngat_new_oss.jar:ngat_astrometry.jar:ngat_new_icm.jar::ngat_new_phase2.jar:ngat_new_tcm.jar:ngat_util.jar:log4j-1.2.13.jar:mysql-connector-java-3.1.12-bin.jar"
ENV CLASSPATH="ngat_new_oss.jar:ngat_astrometry.jar:ngat_new_icm.jar::ngat_new_phase2.jar:ngat_new_tcm.jar:ngat_util.jar:log4j-1.2.13.jar:mysql-connector-j-9.3.0.jar"
# Current oss command invocation:
#$JAVA -DP2MODEL -Xmx2048m $IPV4 $POLICY $JRS ngat.oss.impl.mysql.ModelRMILauncher >>& $P2_CONSOLE_LOG_FILE &
# Which after expanding the environment becomes:
# /usr/java/jdk1.5.0_17/bin/java -DP2MODEL -Xmx2048m -Djava.net.preferIPv4Stack=true -Djava.security.policy=/oss/tmp/policy.dat -Djava.rmi.server.hostname=oss.lt.com ngat.oss.impl.mysql.ModelRMILauncher
# Expects $RMIREGISTRY_HOST to be passed into dockerfile as location (IP address) of rmiregistry
ENTRYPOINT java -DP2MODEL -Xmx2048m -Djava.net.preferIPv4Stack=true -Djava.security.policy=/oss/tmp/policy.dat -Djava.rmi.server.hostname=$RMIREGISTRY_HOST ngat.oss.impl.mysql.ModelRMILauncher