summaryrefslogtreecommitdiffstats
path: root/mod/genprocessor/docker/job/Dockerfile
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2019-11-11 14:31:28 -0500
committerMichael Hwang <mhwang@research.att.com>2019-11-18 17:06:45 -0500
commit566a0d2c4e917fd03b0126b5cc610539f3db3cb1 (patch)
treee2abec4b0a9ea77c09e7de666c3b115ae55c0845 /mod/genprocessor/docker/job/Dockerfile
parent849da15d5b7ddc68e4c2b90b603fc8948d4b5e6d (diff)
Add genprocessor project
Signed-off-by: Michael Hwang <mhwang@research.att.com> Issue-ID: DCAEGEN2-1860 Change-Id: Ie22a30ed8c72327ff0a28afa64ae53d8d6458a0c
Diffstat (limited to 'mod/genprocessor/docker/job/Dockerfile')
-rw-r--r--mod/genprocessor/docker/job/Dockerfile15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/genprocessor/docker/job/Dockerfile b/mod/genprocessor/docker/job/Dockerfile
new file mode 100644
index 0000000..b70a06c
--- /dev/null
+++ b/mod/genprocessor/docker/job/Dockerfile
@@ -0,0 +1,15 @@
+FROM maven:3-jdk-8
+
+COPY . /code
+WORKDIR /code
+RUN mvn package dependency:copy-dependencies
+ENV GENPROC_WORKING_DIR=/work
+ENV GENPROC_ONBOARDING_API_HOST=http://onboarding-api/onboarding
+ENV GENPROC_PROCESSOR_CLASSFILE_PATH=/code/target/classes/sandbox/DCAEProcessor.class
+ENV GENPROC_SLEEP_SEC=10
+
+ENV _RUN_COMMAND="java -cp \"target/genprocessor-1.0.1.jar:target/dependency/*\" sandbox.App gen"
+RUN printf "#!/bin/bash\nwhile true\ndo\n\t$_RUN_COMMAND\n\tsleep $GENPROC_SLEEP_SEC\ndone" > /code/run.sh \
+ & chmod +x /code/run.sh
+
+CMD /code/run.sh